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

Function test_list_items

tests/pytests/unit/utils/test_mmap_cache.py:136–146  ·  view source on GitHub ↗
(cache)

Source from the content-addressed store, hash-verified

134
135
136def test_list_items(cache):
137 data = {"key1": "val1", "key2": "val2", "key3": True}
138 for k, v in data.items():
139 if v is True:
140 cache.put(k)
141 else:
142 cache.put(k, v)
143
144 items = cache.list_items()
145 assert len(items) == 3
146 assert set(items) == {("key1", "val1"), ("key2", "val2"), ("key3", True)}
147
148
149# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 4

list_itemsMethod · 0.80
setFunction · 0.50
itemsMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected