You've already forked RekomenciBackend
refactor tests
This commit is contained in:
@@ -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,
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user