Skip to content

Commit cc29cf7

Browse files
committed
Update tests for stats
1 parent a67cbd9 commit cc29cf7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test_api.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def client() -> Generator:
4545

4646
class TestStats:
4747
def test_stats(self, client, db):
48-
ni_schools = [School(id=f"NI-{i}") for i in range(10)]
49-
be_schools = [School(id="BE-1")]
48+
ni_schools = [School(id=f"NI-{i}", update_timestamp=datetime(2025, 1, 1)) for i in range(10)]
49+
be_schools = [School(id="BE-1", update_timestamp=datetime(2024,12,24))]
5050
for school in ni_schools + be_schools:
5151
db.add(school)
5252
db.commit()
@@ -55,8 +55,8 @@ def test_stats(self, client, db):
5555

5656
assert response.status_code == 200
5757
assert response.json() == [
58-
{"state": "BE", "count": 1},
59-
{"state": "NI", "count": 10},
58+
{"state": "BE", "count": 1, "last_updated": "2024-12-24"},
59+
{"state": "NI", "count": 10, "last_updated": "2025-01-01"},
6060
]
6161

6262

0 commit comments

Comments
 (0)