File tree Expand file tree Collapse file tree 3 files changed +9
-13
lines changed
Expand file tree Collapse file tree 3 files changed +9
-13
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
119119def test_revoked_token_of_different_type (app ):
Original file line number Diff line number Diff 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
228228def test_default_cookie_options (app ):
You can’t perform that action at this time.
0 commit comments