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)