clear removes all cached entries
(self, cache: RequestCache)
| 160 | assert cache.is_pending("req-1") is True |
| 161 | |
| 162 | def test_clear(self, cache: RequestCache) -> None: |
| 163 | """clear removes all cached entries""" |
| 164 | cache._cache["req-1"] = CacheEntry(response={"success": True}) |
| 165 | cache._cache["req-2"] = CacheEntry(response={"success": True}) |
| 166 | cache._pending_results["req-3"] = {"success": True} |
| 167 | |
| 168 | cache.clear() |
| 169 | |
| 170 | assert cache.size == 0 |
| 171 | assert len(cache._pending_results) == 0 |
| 172 | |
| 173 | def test_size(self, cache: RequestCache) -> None: |
| 174 | """size returns number of cached entries""" |
nothing calls this directly
no test coverage detected