Files
planet/backend/tests/test_earth_layer_adapters.py
T
linkong c1d651589a
ci / backend (push) Has been cancelled
ci / frontend (push) Has been cancelled
ci / delivery (push) Has been cancelled
release / images (push) Has been cancelled
release: bump version to 0.76.19
2026-11-09 15:12:50 +08:00

16 lines
682 B
Python

from app.services.earth_layer_adapters import (
get_earth_cache_patterns_for_source,
get_earth_update_layers_for_change,
)
def test_news_changes_do_not_invalidate_earth_summary_cache():
assert get_earth_update_layers_for_change("earth_news_items", "earth_news_items") == ["news"]
assert get_earth_cache_patterns_for_source("earth_news_items") == []
assert get_earth_cache_patterns_for_source("media_news_archive") == []
def test_counted_layers_still_invalidate_earth_summary_cache():
for source in ("aisstream_vessels", "arcgis_cables", "celestrak_tle", "top500", "ris_live_bgp"):
assert "summary*" in get_earth_cache_patterns_for_source(source)