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

Method test_zadd_ch

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

Source from the content-addressed store, hash-verified

3471 assert_resp_response(r, response, [(b"a1", 99.0)], [[b"a1", 99.0]])
3472
3473 async def test_zadd_ch(self, r: redis.Redis):
3474 assert await r.zadd("a", {"a1": 1}) == 1
3475 assert await r.zadd("a", {"a1": 99, "a2": 2}, ch=True) == 2
3476 response = await r.zrange("a", 0, -1, withscores=True)
3477 assert_resp_response(
3478 r, response, [(b"a2", 2.0), (b"a1", 99.0)], [[b"a2", 2.0], [b"a1", 99.0]]
3479 )
3480
3481 async def test_zadd_incr(self, r: redis.Redis):
3482 assert await r.zadd("a", {"a1": 1}) == 1

Callers

nothing calls this directly

Calls 3

assert_resp_responseFunction · 0.90
zaddMethod · 0.80
zrangeMethod · 0.80

Tested by

no test coverage detected