@@ -67,7 +67,7 @@ def test_jwt_required(app):
6767 response = test_client .get (url , headers = make_headers (refresh_token ))
6868 json_data = json .loads (response .get_data (as_text = True ))
6969 assert response .status_code == 422
70- assert json_data == {'msg' : 'Only access tokens can access this endpoint ' }
70+ assert json_data == {'msg' : 'Only access tokens are allowed ' }
7171
7272
7373def test_fresh_jwt_required (app ):
@@ -110,7 +110,7 @@ def test_fresh_jwt_required(app):
110110 response = test_client .get (url , headers = make_headers (refresh_token ))
111111 json_data = json .loads (response .get_data (as_text = True ))
112112 assert response .status_code == 422
113- assert json_data == {'msg' : 'Only access tokens can access this endpoint ' }
113+ assert json_data == {'msg' : 'Only access tokens are allowed ' }
114114
115115 # Test with custom response
116116 @jwtM .needs_fresh_token_loader
@@ -135,12 +135,12 @@ def test_refresh_jwt_required(app):
135135 response = test_client .get (url , headers = make_headers (fresh_access_token ))
136136 json_data = json .loads (response .get_data (as_text = True ))
137137 assert response .status_code == 422
138- assert json_data == {'msg' : 'Only refresh tokens can access this endpoint ' }
138+ assert json_data == {'msg' : 'Only refresh tokens are allowed ' }
139139
140140 response = test_client .get (url , headers = make_headers (access_token ))
141141 json_data = json .loads (response .get_data (as_text = True ))
142142 assert response .status_code == 422
143- assert json_data == {'msg' : 'Only refresh tokens can access this endpoint ' }
143+ assert json_data == {'msg' : 'Only refresh tokens are allowed ' }
144144
145145 response = test_client .get (url , headers = None )
146146 json_data = json .loads (response .get_data (as_text = True ))
@@ -176,7 +176,7 @@ def test_jwt_optional(app):
176176 response = test_client .get (url , headers = make_headers (refresh_token ))
177177 json_data = json .loads (response .get_data (as_text = True ))
178178 assert response .status_code == 422
179- assert json_data == {'msg' : 'Only access tokens can access this endpoint ' }
179+ assert json_data == {'msg' : 'Only access tokens are allowed ' }
180180
181181 response = test_client .get (url , headers = None )
182182 json_data = json .loads (response .get_data (as_text = True ))
0 commit comments