An open source, non-profit web search engine
Address review
claude[bot]22b03c31a238
diff --git a/test/test_admin_blacklist_status.py b/test/test_admin_blacklist_status.pyindex 9e62e7f..c05f0cb 100644--- a/test/test_admin_blacklist_status.py+++ b/test/test_admin_blacklist_status.py@@ -7,6 +7,7 @@ from django.contrib.auth import get_user_modelfrom redis import ConnectionError as RedisConnectionErrorfrom mwmbl import admin_views+from mwmbl.crawler.stats import StatsManagerfrom mwmbl.indexer import blacklist_snapshot, purge_queuefrom mwmbl.indexer.blacklist_snapshot import (HASH_DTYPE,@@ -170,6 +171,16 @@ def test_removed_counts_covers_the_requested_window(wired_redis):assert counts[0]["date"] > counts[-1]["date"]+def test_removed_counts_reads_back_what_the_purge_recorded(wired_redis):+ """The page and StatsManager name today's key in different modules, so a disagreement+ about which day "today" is shows up as a permanent zero rather than as an error."""+ StatsManager(wired_redis).record_blacklisted_removed(5)++ counts = admin_views._removed_counts(14)++ assert counts[0]["count"] == 5++# ---------------------------------------------------------------------------# The view# ---------------------------------------------------------------------------