kin: BATON-SEC-007-backend_dev
This commit is contained in:
parent
9a450d2a84
commit
2cf141f6ed
3 changed files with 13 additions and 15 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue