summaryrefslogtreecommitdiff
path: root/tests/test_commands.py
diff options
context:
space:
mode:
authorChayim <chayim@users.noreply.github.com>2021-10-18 12:08:54 +0300
committerGitHub <noreply@github.com>2021-10-18 12:08:54 +0300
commit576d33c148de867fd48077a55d51135d14e45ec0 (patch)
tree022318ebcc92b8e20988758194b02c1bad574396 /tests/test_commands.py
parent726eedeae75e51c18bdb2ba697ff390a1efb2b78 (diff)
downloadredis-py-576d33c148de867fd48077a55d51135d14e45ec0.tar.gz
REPLICAOF command implementation (#1622)
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r--tests/test_commands.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 802d8e4..2136d37 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -3613,6 +3613,14 @@ class TestRedisCommands:
assert r.restore(key, 0, dumpdata, frequency=5)
assert r.get(key) == b'blee!'
+ @skip_if_server_version_lt('5.0.0')
+ def test_replicaof(self, r):
+
+ with pytest.raises(redis.ResponseError):
+ assert r.replicaof("NO ONE")
+
+ assert r.replicaof("NO", "ONE")
+
class TestBinarySave: