Skip to content

Commit 4eccf4e

Browse files
committed
update packages
1 parent 36bbbab commit 4eccf4e

File tree

6 files changed

+472
-363
lines changed

6 files changed

+472
-363
lines changed

app/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
if __name__ == "__main__":
9-
granian.Granian( # type: ignore[attr-defined]
9+
granian.Granian(
1010
target="app.application:build_app",
1111
factory=True,
1212
address=settings.app_host,

app/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66

77
async def duplicate_key_error_handler(_: Request, exc: DuplicateKeyError) -> JSONResponse:
88
return JSONResponse(
9-
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
9+
status_code=status.HTTP_422_UNPROCESSABLE_CONTENT,
1010
content={"detail": exc.detail},
1111
)

app/resources/db.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ async def create_sa_engine() -> typing.AsyncIterator[sa.AsyncEngine]:
1919
pool_pre_ping=settings.db_pool_pre_ping,
2020
max_overflow=settings.db_max_overflow,
2121
)
22+
engine.pool.status()
2223
logger.info("SQLAlchemy engine has been initialized")
2324
try:
2425
yield engine

tests/test_cards.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async def test_create_cards(client: AsyncClient, db_session: AsyncSession) -> No
7777
json=[cards_to_create[0].model_dump(), cards_to_create[1].model_dump()],
7878
)
7979
data = response.json()
80-
assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY
80+
assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT
8181
assert data["detail"] == "A record matching the supplied data already exists."
8282

8383

tests/test_decks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async def test_get_one_deck(client: AsyncClient, db_session: AsyncSession) -> No
4949
@pytest.mark.parametrize(
5050
("name", "description", "status_code"),
5151
[
52-
(None, None, status.HTTP_422_UNPROCESSABLE_ENTITY),
52+
(None, None, status.HTTP_422_UNPROCESSABLE_CONTENT),
5353
("test deck", None, status.HTTP_200_OK),
5454
("test deck", "test deck description", status.HTTP_200_OK),
5555
],
@@ -90,7 +90,7 @@ async def test_put_decks_wrong_body(client: AsyncClient, db_session: AsyncSessio
9090
f"/api/decks/{deck.id}/",
9191
json={"name": None, "description": None},
9292
)
93-
assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY
93+
assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT
9494

9595

9696
async def test_put_decks_not_exist(client: AsyncClient) -> None:

0 commit comments

Comments
 (0)