Test that the list works correctly.
(mock_redis_cache)
| 350 | |
| 351 | |
| 352 | def test_list_simple(mock_redis_cache): |
| 353 | """ |
| 354 | Test that the list works correctly. |
| 355 | """ |
| 356 | redis_server = redis_cache.__context__["cache.redis"]["client"] |
| 357 | |
| 358 | redis_cache.store("minions/myhost", "grain", {"os": "Linux"}) |
| 359 | redis_cache.store("minions/myhost/vm", "gain", {"os": "Windows"}) |
| 360 | redis_cache.store("minions/yourhost", "grain", {"os": "MacOS"}) |
| 361 | |
| 362 | assert {"vm", "grain"} == set(redis_cache.list_("minions/myhost")) |
| 363 | assert {"myhost", "yourhost"} == set(redis_cache.list_("minions")) |