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

Function test_basic_fetch

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

Test that a basic fetch retrieves the correct value.

(mock_redis_cache)

Source from the content-addressed store, hash-verified

248
249
250def test_basic_fetch(mock_redis_cache):
251 """
252 Test that a basic fetch retrieves the correct value.
253 """
254 redis_server = redis_cache.__context__["cache.redis"]["client"]
255
256 redis_cache.store("minions/myhost", "grain", {"os": "Linux"})
257
258 assert {"os": "Linux"} == redis_cache.fetch("minions/myhost", "grain")
259
260
261def test_basic_updated(mock_redis_cache):

Callers

nothing calls this directly

Calls 2

storeMethod · 0.45
fetchMethod · 0.45

Tested by

no test coverage detected