(store: KVStorage[str, bytes])
| 16 | |
| 17 | |
| 18 | def test_encoding_wrapper(store: KVStorage[str, bytes]) -> None: |
| 19 | wrapper = KVStorageCodecWrapper(store, JSONCodec() | BytesCodec()) |
| 20 | |
| 21 | wrapper.set("key", [1, 2, 3]) |
| 22 | assert store.get("key") == b"[1,2,3]" |
| 23 | |
| 24 | assert wrapper.get("key") == [1, 2, 3] |
| 25 | assert [*wrapper.get_many(["key", "missing"])] == [("key", [1, 2, 3])] |
nothing calls this directly
no test coverage detected