MCPcopy Create free account
hub / github.com/saltstack/salt / test_remove_single

Function test_remove_single

tests/pytests/unit/cache/test_redis_cache.py:272–282  ·  view source on GitHub ↗

Remove the last entry in the cache.

(mock_redis_cache)

Source from the content-addressed store, hash-verified

270
271
272def test_remove_single(mock_redis_cache):
273 """
274 Remove the last entry in the cache.
275 """
276 redis_server = redis_cache.__context__["cache.redis"]["client"]
277
278 redis_cache.store("minions/myhost", "grain", {"os": "Linux"})
279 redis_cache.flush("minions/myhost", "grain")
280
281 expected = {}
282 assert expected == redis_server.db
283
284
285def test_remove_remaining(mock_redis_cache):

Callers

nothing calls this directly

Calls 2

storeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected