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

Method test_zadd_nx

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

Source from the content-addressed store, hash-verified

3457 await r.zadd("a", mapping, incr=True)
3458
3459 async def test_zadd_nx(self, r: redis.Redis):
3460 assert await r.zadd("a", {"a1": 1}) == 1
3461 assert await r.zadd("a", {"a1": 99, "a2": 2}, nx=True) == 1
3462 response = await r.zrange("a", 0, -1, withscores=True)
3463 assert_resp_response(
3464 r, response, [(b"a1", 1.0), (b"a2", 2.0)], [[b"a1", 1.0], [b"a2", 2.0]]
3465 )
3466
3467 async def test_zadd_xx(self, r: redis.Redis):
3468 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