Browse Source

We want cache to work with dict

master
Raphael Roberts 5 years ago
parent
commit
7f426636ec
  1. 9
      tests/test_cache.py

9
tests/test_cache.py

@ -28,3 +28,12 @@ def test_cache_write_store_load_read(tmp_path):
c.store()
c_load = Cache(tmp_path)
assert c_load.read("key") == "val"
def test_cache_write_store_load_read_with_dict(tmp_path):
c = Cache(tmp_path)
c.write("key", {"key": "val"})
c.store()
c_load = Cache(tmp_path)
assert isinstance(c_load.read("key"), dict)
assert c_load.read("key")["key"] == "val"
Loading…
Cancel
Save