MCPcopy Index your code
hub / github.com/SourceCode-AI/aura / test_always_delete_expired

Function test_always_delete_expired

tests/test_cache.py:201–213  ·  view source on GitHub ↗
(exp_mock, mock_cache, fixtures)

Source from the content-addressed store, hash-verified

199
200@mock.patch("aura.cache.CacheItem.is_expired", new_callable=mock.PropertyMock)
201def test_always_delete_expired(exp_mock, mock_cache, fixtures):
202 exp_mock.return_value = True
203
204 for k, v in CACHE_ENTRIES.items():
205 create_cache_entry(k, v, fixtures=fixtures)
206
207 items = list(cache.CacheItem.analyze())
208
209 cache.CacheItem.cleanup(items=items)
210
211 for x in items:
212 assert x.is_expired is True
213 assert x._deleted is True
214
215
216@responses.activate

Callers

nothing calls this directly

Calls 3

create_cache_entryFunction · 0.85
analyzeMethod · 0.45
cleanupMethod · 0.45

Tested by

no test coverage detected