MCPcopy Create free account
hub / github.com/TheSecuredAnalyst/security-suite / test_cache_clear_all

Method test_cache_clear_all

tests/test_cache.py:94–106  ·  view source on GitHub ↗

Test clearing all cache entries.

(self, temp_cache, sample_result)

Source from the content-addressed store, hash-verified

92 assert short_cache.get(target, modules) is None
93
94 def test_cache_clear_all(self, temp_cache, sample_result):
95 """Test clearing all cache entries."""
96 targets = ["example.com", "test.com", "sample.com"]
97 modules = ["osint"]
98
99 for target in targets:
100 temp_cache.set(target, modules, sample_result)
101
102 assert temp_cache.get_stats()["total_entries"] == 3
103
104 cleared = temp_cache.clear()
105 assert cleared == 3
106 assert temp_cache.get_stats()["total_entries"] == 0
107
108 def test_cache_clear_specific_target(self, temp_cache, sample_result):
109 """Test clearing specific target from cache."""

Callers

nothing calls this directly

Calls 3

clearMethod · 0.80
setMethod · 0.45
get_statsMethod · 0.45

Tested by

no test coverage detected