mirror of
https://github.com/LukeHagar/connexion.git
synced 2025-12-06 12:27:45 +00:00
Fix tests for Flask 2.2 (#1572)
This commit is contained in:
committed by
Robbe Sneyders
parent
5cc9b0e787
commit
e39c255217
@@ -273,17 +273,19 @@ def test_swagger_json_content_type(simple_app):
|
|||||||
assert response.content_type == "application/json"
|
assert response.content_type == "application/json"
|
||||||
|
|
||||||
|
|
||||||
def test_single_route(simple_app):
|
def test_single_route():
|
||||||
|
app = App(__name__)
|
||||||
|
|
||||||
def route1():
|
def route1():
|
||||||
return "single 1"
|
return "single 1"
|
||||||
|
|
||||||
@simple_app.route("/single2", methods=["POST"])
|
@app.route("/single2", methods=["POST"])
|
||||||
def route2():
|
def route2():
|
||||||
return "single 2"
|
return "single 2"
|
||||||
|
|
||||||
app_client = simple_app.app.test_client()
|
app_client = app.app.test_client()
|
||||||
|
|
||||||
simple_app.add_url_rule("/single1", "single1", route1, methods=["GET"])
|
app.add_url_rule("/single1", "single1", route1, methods=["GET"])
|
||||||
|
|
||||||
get_single1 = app_client.get("/single1") # type: flask.Response
|
get_single1 = app_client.get("/single1") # type: flask.Response
|
||||||
assert get_single1.data == b"single 1"
|
assert get_single1.data == b"single 1"
|
||||||
|
|||||||
Reference in New Issue
Block a user