From 8c06d67f574bef941f7e19b1b2b36e767ed42b6d Mon Sep 17 00:00:00 2001 From: Seongchuel Ahn Date: Mon, 8 May 2023 19:55:23 +0900 Subject: 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> --- tests/test_commands.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/test_commands.py') 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 @@ -696,6 +696,14 @@ class TestRedisCommands: with pytest.raises(TypeError): 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): -- cgit v1.2.1