Improve timestamp handling and event navigation
This commit is contained in:
@@ -43,6 +43,16 @@ async def test_heartbeat_validation_400(app_client, auth_headers):
|
||||
assert r.json()["error"]["code"] == "validation"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize("observed_at", ["2026-05-27T09:00:00", "2026-05-27T09:00:00+04:00"])
|
||||
async def test_heartbeat_requires_utc_timestamp(app_client, auth_headers, observed_at):
|
||||
hb = make_heartbeat()
|
||||
hb["observed_at"] = observed_at
|
||||
r = await app_client.post("/api/v1/heartbeat", json=hb, headers=auth_headers)
|
||||
assert r.status_code == 400
|
||||
assert r.json()["error"]["code"] == "validation"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_heartbeat_rejects_extra_fields(app_client, auth_headers):
|
||||
hb = make_heartbeat()
|
||||
|
||||
Reference in New Issue
Block a user