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

Method test_cache_stats

tests/test_cache.py:121–128  ·  view source on GitHub ↗

Test cache statistics.

(self, temp_cache, sample_result)

Source from the content-addressed store, hash-verified

119 assert temp_cache.get("test.com", modules) is not None
120
121 def test_cache_stats(self, temp_cache, sample_result):
122 """Test cache statistics."""
123 temp_cache.set("example.com", ["osint"], sample_result)
124 temp_cache.set("test.com", ["web"], sample_result)
125
126 stats = temp_cache.get_stats()
127 assert stats["total_entries"] == 2
128 assert stats["ttl_seconds"] == 3600
129
130
131class TestCacheEntry:

Callers

nothing calls this directly

Calls 2

setMethod · 0.45
get_statsMethod · 0.45

Tested by

no test coverage detected