Skip to content

Commit c8e39ce

Browse files
authored
Fix test_logs: use correct schema fields (bytes_transferred, event_type)
1 parent f8acbc2 commit c8e39ce

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

backend/tests/test_logs.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55

66
def test_create_log():
77
payload = {
8-
"timestamp": "2025-01-01T00:00:00Z",
98
"source_ip": "10.0.0.1",
109
"destination_ip": "10.0.0.2",
11-
"bytes_sent": 1234,
12-
"bytes_received": 5678,
1310
"protocol": "TCP",
14-
"status": "OK"
11+
"bytes_transferred": 1234,
12+
"event_type": "normal",
13+
"details": "test log"
1514
}
1615
resp = client.post("/logs/", json=payload)
1716
assert resp.status_code in (200, 201)

0 commit comments

Comments
 (0)