summaryrefslogtreecommitdiff
path: root/tests/test_commands.py
diff options
context:
space:
mode:
authorSeongchuel Ahn <aciddust20@gmail.com>2023-05-08 19:55:23 +0900
committerGitHub <noreply@github.com>2023-05-08 13:55:23 +0300
commit8c06d67f574bef941f7e19b1b2b36e767ed42b6d (patch)
treeb96b704ff0593f3b7e2d06f5cd12af42d9213ca8 /tests/test_commands.py
parentc0833f60a1d9ec85c589004aba6b6739e6298248 (diff)
downloadredis-py-8c06d67f574bef941f7e19b1b2b36e767ed42b6d.tar.gz
Add client no-touch (#2745)
* Add client no-touch * Update redis/commands/core.py Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com> * Update test_commands.py Improve test_client_no_touch * Update test_commands.py Add async version test case * Chore remove whitespace Oops --------- Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
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 cb89669..c71e347 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -697,6 +697,14 @@ class TestRedisCommands:
r.client_no_evict()
@pytest.mark.onlynoncluster
+ @skip_if_server_version_lt("7.2.0")
+ def test_client_no_touch(self, r):
+ assert r.client_no_touch("ON") == b"OK"
+ assert r.client_no_touch("OFF") == b"OK"
+ with pytest.raises(TypeError):
+ r.client_no_touch()
+
+ @pytest.mark.onlynoncluster
@skip_if_server_version_lt("3.2.0")
def test_client_reply(self, r, r_timeout):
assert r_timeout.client_reply("ON") == b"OK"