Skip to content

Commit 939b406

Browse files
committed
fix: use HTTP_204_NO_CONTENT instead of HTTP_204_NO_DATA
1 parent 6c2f504 commit 939b406

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/app_name_snake_case/presentation/fastapi/routes/healthcheck.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
@healthcheck_router.get(
1111
"/health",
12-
responses={status.HTTP_204_NO_DATA: {}},
12+
responses={status.HTTP_204_NO_CONTENT: {}},
1313
description="Checking if the server can accept requests.",
1414
tags=[Tag.monitoring],
1515
)
1616
def healthcheck() -> Response:
17-
return Response(status_code=status.HTTP_204_NO_DATA)
17+
return Response(status_code=status.HTTP_204_NO_CONTENT)

tests/test_app_name_snake_case/test_main/test_fastapi/test_routes/test_healthcheck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ async def test_ok(client: AsyncClient, stage: str) -> None:
88
response = await client.get("/health")
99

1010
if stage == "status_code":
11-
assert response.status_code == status.HTTP_204_NO_DATA
11+
assert response.status_code == status.HTTP_204_NO_CONTENT
1212

1313
if stage == "body":
1414
assert response.content == bytes()

0 commit comments

Comments
 (0)