File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
lib/pbench/test/unit/server Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -171,24 +171,24 @@ def test_user_relogin(client, server_config):
171171 assert data ["message" ] == "Retry login after some time"
172172 assert response .status_code == 403
173173
174- # Immediate re-login without auth header
174+ # Re-login after a second
175+ time .sleep (1 )
175176 response = client .post (
176177 f"{ server_config .rest_uri } /login" ,
177178 json = {"username" : "user" , "password" : "12345" },
178179 )
179180 data = response .json
180- assert data ["message" ] == "Retry login after some time"
181- assert response . status_code == 409
181+ assert data ["auth_token" ]
182+ assert data [ "status" ] == "success"
182183
183- # Re-login after a second
184- time .sleep (1 )
184+ # Immediate re-login without auth header
185185 response = client .post (
186186 f"{ server_config .rest_uri } /login" ,
187187 json = {"username" : "user" , "password" : "12345" },
188188 )
189189 data = response .json
190- assert data ["auth_token" ]
191- assert data [ "status" ] == "success"
190+ assert data ["message" ] == "Retry login after some time"
191+ assert response . status_code == 409
192192
193193 @staticmethod
194194 def test_user_login_with_wrong_password (client , server_config ):
You can’t perform that action at this time.
0 commit comments