summaryrefslogtreecommitdiff
path: root/tests/test_commands.py
diff options
context:
space:
mode:
authordvora-h <67596500+dvora-h@users.noreply.github.com>2022-12-14 11:17:51 +0200
committerGitHub <noreply@github.com>2022-12-14 11:17:51 +0200
commit6487f9555ba2d08083a081df9b65b642427361fa (patch)
tree26e741fb2fdd7200c20f34185ec6f09d633e0f4c /tests/test_commands.py
parent3a121bef7bbc5bb5f07b119b0eef2f7527a38eda (diff)
downloadredis-py-6487f9555ba2d08083a081df9b65b642427361fa.tar.gz
Add support for certain LATENCY commands (#2503)
* add latency commands * fix tests in cluster
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r--tests/test_commands.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 77e2e72..12ffcfe 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -4527,16 +4527,23 @@ class TestRedisCommands:
with pytest.raises(NotImplementedError):
r.latency_histogram()
- @skip_if_server_version_lt("7.0.0")
def test_latency_graph_not_implemented(self, r: redis.Redis):
with pytest.raises(NotImplementedError):
r.latency_graph()
- @skip_if_server_version_lt("7.0.0")
def test_latency_doctor_not_implemented(self, r: redis.Redis):
with pytest.raises(NotImplementedError):
r.latency_doctor()
+ def test_latency_history(self, r: redis.Redis):
+ assert r.latency_history("command") == []
+
+ def test_latency_latest(self, r: redis.Redis):
+ assert r.latency_latest() == []
+
+ def test_latency_reset(self, r: redis.Redis):
+ assert r.latency_reset() == 0
+
@pytest.mark.onlynoncluster
@skip_if_server_version_lt("4.0.0")
@skip_if_redis_enterprise()