This commit is contained in:
@@ -159,6 +159,22 @@ def test_clear_growth_cache_removes_shared_file(tmp_path, monkeypatch):
|
||||
assert not shared_cache.exists()
|
||||
|
||||
|
||||
def test_growth_source_fingerprint_short_cache_clears_with_growth_cache(tmp_path, monkeypatch):
|
||||
from services import cache_service
|
||||
|
||||
shared_cache = tmp_path / "growth_analysis_cache.pkl"
|
||||
monkeypatch.setattr(cache_service, "_GROWTH_SHARED_CACHE_FILE", shared_cache)
|
||||
cache_service.clear_growth_cache()
|
||||
|
||||
cache_service.set_growth_source_fingerprint_cache("growth:source", ("2026-05-17", 10))
|
||||
|
||||
assert cache_service.get_growth_source_fingerprint_cache("growth:source") == ("2026-05-17", 10)
|
||||
|
||||
cache_service.clear_growth_cache()
|
||||
|
||||
assert cache_service.get_growth_source_fingerprint_cache("growth:source") is None
|
||||
|
||||
|
||||
def test_daily_sales_shared_view_cache_roundtrip(tmp_path, monkeypatch):
|
||||
from routes import daily_sales_routes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user