Skip to content

Commit 620306a

Browse files
Fix tests for Flask 2.2 (#1572)
1 parent 1ce3e2e commit 620306a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/api/test_bootstrap.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,17 +237,19 @@ def test_swagger_json_content_type(simple_app):
237237
assert response.content_type == 'application/json'
238238

239239

240-
def test_single_route(simple_app):
240+
def test_single_route():
241+
app = App(__name__)
242+
241243
def route1():
242244
return 'single 1'
243245

244-
@simple_app.route('/single2', methods=['POST'])
246+
@app.route('/single2', methods=['POST'])
245247
def route2():
246248
return 'single 2'
247249

248-
app_client = simple_app.app.test_client()
250+
app_client = app.app.test_client()
249251

250-
simple_app.add_url_rule('/single1', 'single1', route1, methods=['GET'])
252+
app.add_url_rule('/single1', 'single1', route1, methods=['GET'])
251253

252254
get_single1 = app_client.get('/single1') # type: flask.Response
253255
assert get_single1.data == b'single 1'

0 commit comments

Comments
 (0)