Skip to content

Commit

Permalink
python 3.10 tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lesnik512 committed May 11, 2024
1 parent b1e525f commit 3cdb316
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tests/test_fastapi_di.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ async def read_root(
async def test_read_main() -> None:
response = client.get("/")
assert response.status_code == status.HTTP_200_OK
assert datetime.datetime.fromisoformat(response.json()) == await container.DIContainer.async_resource()
assert (
datetime.datetime.fromisoformat(response.json().replace("Z", "+00:00"))
== await container.DIContainer.async_resource()
)
5 changes: 4 additions & 1 deletion tests/test_litestar_di_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ async def test_litestar_di() -> None:
with TestClient(app=app) as client:
response = client.get("/")
assert response.status_code == HTTP_200_OK, response.text
assert datetime.datetime.fromisoformat(response.json()) == await container.DIContainer.async_resource()
assert (
datetime.datetime.fromisoformat(response.json().replace("Z", "+00:00"))
== await container.DIContainer.async_resource()
)

0 comments on commit 3cdb316

Please sign in to comment.