summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorItamar Haber <itamar@redislabs.com>2018-10-15 20:37:55 +0300
committerRoey Prat <roey.prat@redislabs.com>2018-10-28 12:12:53 +0200
commit1f8c69cfcd6c0fad819fc78777b56873ec8d26dc (patch)
tree3c32b515a6ea399b5b136940c7c28a55ec68aa50 /tests
parentf1ece6b139d7cf4a7900526ff1d53b1387d89c68 (diff)
downloadredis-py-1f8c69cfcd6c0fad819fc78777b56873ec8d26dc.tar.gz
Implements XACK
Diffstat (limited to 'tests')
-rw-r--r--tests/test_commands.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 946934d..1f70230 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -1732,6 +1732,16 @@ class TestStrictCommands(object):
assert sr.xtrim(stream_name, 234) == 0
assert sr.xtrim(stream_name, 234, approximate=False) == 66
+ @skip_if_server_version_lt('5.0.0')
+ def test_strict_xack(self, sr):
+ stream_name = 'xack_test_stream'
+ sr.delete(stream_name)
+ group_name = 'xack_test_group'
+
+ assert sr.xack(stream_name, group_name, 0) == 0
+ assert sr.xack(stream_name, group_name, '1-1') == 0
+ assert sr.xack(stream_name, group_name, *[x for x in range(5)]) == 0
+
def test_strict_zadd(self, sr):
sr.zadd('a', 1.0, 'a1', 2.0, 'a2', a3=3.0)
assert sr.zrange('a', 0, -1, withscores=True) == \