Skip to content

Commit cfa1d08

Browse files
committed
resolve tests
1 parent 6f3ff90 commit cfa1d08

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

servicex_app/servicex_app_test/resources/users/test_token_refresh.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ def test_token_refresh_with_auth_disabled(self, client):
2121
response: Response = client.post("/token/refresh")
2222

2323
assert response.status_code == 200
24-
assert response.json == {
25-
"message": "Authentication is disabled on this instance"
26-
}
24+
assert "access_token" in response.json
25+
assert response.json["access_token"] == "authentication_disabled"
26+
assert "auth_disabled" in response.json
27+
assert response.json["auth_disabled"] is True
2728

2829
def test_token_refresh_with_auth_enabled_requires_token(self):
2930
"""Test that token refresh requires a valid token when auth is enabled."""
@@ -57,6 +58,9 @@ def test_token_refresh_with_auth_enabled_and_valid_token(self, mocker):
5758

5859
assert response.status_code == 200
5960
assert "access_token" in response.json
61+
assert response.json["access_token"] != "authentication_disabled"
62+
assert "auth_disabled" in response.json
63+
assert response.json["auth_disabled"] is False
6064

6165
def test_token_refresh_with_mismatched_jti(self, mocker):
6266
"""Test that token refresh fails when JTI doesn't match stored token."""

0 commit comments

Comments
 (0)