Skip to content

Commit

Permalink
[DOP-21482] - add cookie comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-lixakov committed Nov 19, 2024
1 parent 6775a5c commit 07d71c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_unit/test_auth/test_auth_keycloak.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ async def test_get_keycloak_user_authorized(
headers=headers,
)

assert response.cookies.get("session") == session_cookie
assert response.status_code == 200
assert response.json() == {
"id": simple_user.id,
Expand Down Expand Up @@ -106,6 +107,7 @@ async def test_get_keycloak_user_expired_access_token(
assert "Access token is invalid or expired" in caplog.text
assert "Access token refreshed and decoded successfully" in caplog.text

assert response.cookies.get("session") != session_cookie # cookie is updated
assert response.status_code == 200
assert response.json() == {
"id": simple_user.id,
Expand Down

0 comments on commit 07d71c0

Please sign in to comment.