kin: BATON-SEC-007-backend_dev

This commit is contained in:
Gros Frumos 2026-03-21 07:39:41 +02:00
parent 3483b71fcb
commit 1cdd1e15da
3 changed files with 13 additions and 15 deletions

View file

@ -54,14 +54,14 @@ async def test_health_returns_status_ok():
@pytest.mark.asyncio
async def test_health_returns_timestamp():
"""GET /health должен вернуть поле timestamp в JSON."""
async def test_health_no_timestamp():
"""GET /health не должен возвращать поле timestamp (устраняет time-based fingerprinting)."""
async with make_app_client() as client:
response = await client.get("/health")
data = response.json()
assert "timestamp" in data
assert isinstance(data["timestamp"], int)
assert "timestamp" not in data
assert data == {"status": "ok"}
@pytest.mark.asyncio