Skip to content

Commit

Permalink
fixed few tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bomzheg committed Feb 11, 2024
1 parent 844255c commit ed2edec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/integration/api_full/test_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async def test_get_team(
team = await create_team_(harry, create_gryffindor_dto_chat(), dao, game_log)
resp = await client.get(
"/teams/my",
headers={"Authorization": "Bearer " + token.access_token},
cookies={"Authorization": "Bearer " + token.access_token},
follow_redirects=True,
)
assert resp.is_success
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/api_full/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ async def test_auth(client: AsyncClient, user: dto.User):
)
assert resp.is_success
resp.read()
access_token = resp.json()["access_token"]
access_token = resp.cookies.get("Authorization")

resp = await client.get(
"/users/me/",
headers={"Authorization": "Bearer " + access_token},
cookies={"Authorization": access_token},
follow_redirects=True,
)
assert resp.is_success
Expand All @@ -40,7 +40,7 @@ async def test_change_password(client: AsyncClient, user: dto.User, auth: AuthPr
token = auth.create_user_token(user)
resp = await client.put(
"/users/me/password/",
headers={"Authorization": "Bearer " + token.access_token},
cookies={"Authorization": "Bearer " + token.access_token},
json={"password": "09876"},
follow_redirects=True,
)
Expand Down

0 comments on commit ed2edec

Please sign in to comment.