Skip to content

Commit 0ac5b25

Browse files
committed
Remove assignment of the PROPAGATE_EXCEPTIONS config setting
1 parent b6183b8 commit 0ac5b25

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

flask_jwt_extended/jwt_manager.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ def init_app(self, app):
7474
self._set_default_configuration_options(app)
7575
self._set_error_handler_callbacks(app)
7676

77-
# Set propagate exceptions, so all of our error handlers properly
78-
# work in production
79-
app.config['PROPAGATE_EXCEPTIONS'] = True
80-
8177
def _set_error_handler_callbacks(self, app):
8278
"""
8379
Sets the error handler callbacks used by this extension

tests/test_blacklist.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ def test_no_blacklist_callback_method_provided(app):
111111
with app.test_request_context():
112112
access_token = create_access_token('username')
113113

114-
with pytest.raises(RuntimeError):
115-
test_client = app.test_client()
116-
test_client.get('/protected', headers=make_headers(access_token))
114+
test_client = app.test_client()
115+
response = test_client.get('/protected', headers=make_headers(access_token))
116+
assert response.status_code == 500
117117

118118

119119
def test_revoked_token_of_different_type(app):

tests/test_cookies.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,12 @@ def test_setting_cookies_wihout_cookies_enabled(app):
217217
app.config['JWT_TOKEN_LOCATION'] = ['headers']
218218
test_client = app.test_client()
219219

220-
with pytest.raises(RuntimeWarning):
221-
test_client.get('/access_token')
222-
with pytest.raises(RuntimeWarning):
223-
test_client.get('/refresh_token')
224-
with pytest.raises(RuntimeWarning):
225-
test_client.get('/delete_tokens')
220+
response = test_client.get('/access_token')
221+
assert response.status_code == 500
222+
response = test_client.get('/refresh_token')
223+
assert response.status_code == 500
224+
response = test_client.get('/delete_tokens')
225+
assert response.status_code == 500
226226

227227

228228
def test_default_cookie_options(app):

0 commit comments

Comments
 (0)