summaryrefslogtreecommitdiff
path: root/tests/test_contributions_api.py
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-11 18:45:54 -0500
committerChristian Cleberg <[email protected]>2026-04-11 18:45:54 -0500
commit01c1b50541b0dc1d42cbdaa90052f6b94ceba20c (patch)
tree5af4bd41d6497d4f49254690f97a39f387d7785b /tests/test_contributions_api.py
parentf0393a0b8d541df6b47bbeee6c4270ce8303bf18 (diff)
downloadhutch-stats-01c1b50541b0dc1d42cbdaa90052f6b94ceba20c.tar.gz
hutch-stats-01c1b50541b0dc1d42cbdaa90052f6b94ceba20c.tar.bz2
hutch-stats-01c1b50541b0dc1d42cbdaa90052f6b94ceba20c.zip
feat: prioritize recent-window backfill before full history
Diffstat (limited to 'tests/test_contributions_api.py')
-rw-r--r--tests/test_contributions_api.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_contributions_api.py b/tests/test_contributions_api.py
index f2b8564..15af7d8 100644
--- a/tests/test_contributions_api.py
+++ b/tests/test_contributions_api.py
@@ -48,6 +48,8 @@ def test_contributions_api_returns_zero_filled_range(client: TestClient, db_sess
assert response.status_code == 200
assert response.json()["is_indexed"] is True
assert response.json()["indexing_state"] == "indexed"
+ assert response.json()["is_recent_window_backfilled"] is False
+ assert response.json()["recent_backfill_state"] == "pending"
assert response.json()["days"] == [
{"date": "2026-03-28", "count": 0, "score": 0.0},
{"date": "2026-03-29", "count": 0, "score": 0.0},
@@ -63,6 +65,9 @@ def test_public_read_registers_actor_for_lazy_indexing(client: TestClient, db_se
assert response.status_code == 200
assert response.json()["is_indexed"] is False
assert response.json()["indexing_state"] == "pending"
+ assert response.json()["is_recent_window_backfilled"] is False
+ assert response.json()["recent_backfill_state"] == "pending"
+ assert response.json()["recent_backfill_completed_at"] is None
assert response.json()["is_backfilled"] is False
assert response.json()["backfill_state"] == "pending"
assert response.json()["backfill_completed_at"] is None
@@ -110,6 +115,8 @@ def test_contribution_stats_api(client: TestClient, db_session) -> None:
assert response.json()["current_streak"] == 2
assert response.json()["is_indexed"] is True
assert response.json()["indexing_state"] == "indexed"
+ assert response.json()["is_recent_window_backfilled"] is False
+ assert response.json()["recent_backfill_state"] == "pending"
assert response.json()["is_backfilled"] is False