refactor tests

This commit is contained in:
ivankirpichnikov
2025-11-21 13:11:48 +03:00
parent fb6c415f1e
commit 2319b471a0
10 changed files with 227 additions and 138 deletions
+8 -6
View File
@@ -1,8 +1,8 @@
from http import HTTPStatus as status
from dirty_equals import IsDict
from dishka import FromDishka
from httpx import AsyncClient
from tests.web_api.helpers import is_success_response
from tests.web_api.ioc import inject
@@ -11,7 +11,9 @@ async def test_healthcheck(
http_client: FromDishka[AsyncClient],
) -> None:
response = await http_client.get("/healthcheck")
response_json = response.json()
assert response.status_code == status.OK
assert response_json["ok"]
assert is_success_response(response)
assert response.json() == IsDict(
{
"ok": True,
}
)