get_cached returns cached entry if exists and not expired
(self, cache: RequestCache)
| 129 | assert call_count == 1 # Only called once |
| 130 | |
| 131 | def test_get_cached_existing(self, cache: RequestCache) -> None: |
| 132 | """get_cached returns cached entry if exists and not expired""" |
| 133 | cache._cache["req-cached"] = CacheEntry(response={"success": True, "data": "cached"}) |
| 134 | |
| 135 | result = cache.get_cached("req-cached") |
| 136 | |
| 137 | assert result is not None |
| 138 | assert result["data"] == "cached" |
| 139 | |
| 140 | def test_get_cached_nonexistent(self, cache: RequestCache) -> None: |
| 141 | """get_cached returns None for nonexistent entries""" |
nothing calls this directly
no test coverage detected