Skip to content

Commit

Permalink
fixes tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Dec 16, 2024
1 parent 4d4351f commit 56ea4f7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions services/web/server/tests/unit/with_dbs/03/test_users__tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from copy import deepcopy
from http import HTTPStatus
from itertools import repeat
from uuid import UUID
from typing import Any

import pytest
from aiohttp.test_utils import TestClient
Expand Down Expand Up @@ -61,7 +61,7 @@ async def fake_tokens(
logged_user: UserInfoDict,
tokens_db_cleanup: None,
faker: Faker,
) -> list:
) -> list[dict[str, Any]]:
all_tokens = []
assert client.app

Expand Down Expand Up @@ -135,7 +135,7 @@ async def test_read_token(
client: TestClient,
logged_user: UserInfoDict,
tokens_db_cleanup: None,
fake_tokens,
fake_tokens: list[dict[str, Any]],
expected: HTTPStatus,
):
assert client.app
Expand All @@ -157,7 +157,7 @@ async def test_read_token(

data, error = await assert_status(resp, expected)

expected_token["token_key"] = f'{UUID(expected_token["token_key"])}'
expected_token["token_key"] = expected_token["token_key"]
expected_token["token_secret"] = None
assert data == expected_token, "list and read item are both read operations"

Expand All @@ -175,7 +175,7 @@ async def test_delete_token(
client: TestClient,
logged_user: UserInfoDict,
tokens_db_cleanup: None,
fake_tokens: list,
fake_tokens: list[dict[str, Any]],
expected: HTTPStatus,
):
assert client.app
Expand Down

0 comments on commit 56ea4f7

Please sign in to comment.