MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / test_get_cached_expired

Method test_get_cached_expired

tests/test_request_cache.py:145–153  ·  view source on GitHub ↗

get_cached returns None for expired entries

(self, cache: RequestCache)

Source from the content-addressed store, hash-verified

143 assert result is None
144
145 def test_get_cached_expired(self, cache: RequestCache) -> None:
146 """get_cached returns None for expired entries"""
147 cache._cache["req-expired"] = CacheEntry(
148 response={"success": True},
149 created_at=time.time() - 120, # 2 minutes ago
150 )
151
152 result = cache.get_cached("req-expired")
153 assert result is None
154
155 def test_is_pending(self, cache: RequestCache) -> None:
156 """is_pending returns correct status"""

Callers

nothing calls this directly

Calls 2

CacheEntryClass · 0.90
get_cachedMethod · 0.80

Tested by

no test coverage detected