MCPcopy
hub / github.com/redis/redis-py / test_hkeys

Method test_hkeys

tests/test_asyncio/test_commands.py:4159–4164  ·  view source on GitHub ↗
(self, r: redis.Redis)

Source from the content-addressed store, hash-verified

4157 assert await r.hincrbyfloat("a", "1", 1.2) == 3.2
4158
4159 async def test_hkeys(self, r: redis.Redis):
4160 h = {b"a1": b"1", b"a2": b"2", b"a3": b"3"}
4161 await r.hset("a", mapping=h)
4162 local_keys = list(h.keys())
4163 remote_keys = await r.hkeys("a")
4164 assert sorted(local_keys) == sorted(remote_keys)
4165
4166 async def test_hlen(self, r: redis.Redis):
4167 await r.hset("a", mapping={"1": 1, "2": 2, "3": 3})

Callers

nothing calls this directly

Calls 3

hsetMethod · 0.80
keysMethod · 0.80
hkeysMethod · 0.80

Tested by

no test coverage detected