summaryrefslogtreecommitdiff
path: root/tests/test_commands.py
diff options
context:
space:
mode:
authorRoey Prat <roey.prat@redislabs.com>2020-10-26 14:43:24 +0200
committerRoey Prat <roey.prat@redislabs.com>2020-11-02 18:51:28 +0200
commit8d4b3d49d0d641f8a0454de35c89886a33212829 (patch)
tree37f858ef95613f19eef06126189a809592f1d7dd /tests/test_commands.py
parent6e85707e79d194053f18af5b4c7dde0a5b99c5fe (diff)
downloadredis-py-roey/slowlog_get_fields.tar.gz
#1374 slowlog get - include fields added in Redis version 4roey/slowlog_get_fields
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r--tests/test_commands.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 2113078..2cc59e4 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -447,6 +447,9 @@ class TestRedisCommands:
def test_ping(self, r):
assert r.ping()
+ # slowlog get was available since 2.2.12
+ # but socket address and name were added in version 4.0
+ @skip_if_server_version_lt('4.0.0')
def test_slowlog_get(self, r, slowlog):
assert r.slowlog_reset()
unicode_string = chr(3456) + 'abcd' + chr(3421)
@@ -468,6 +471,9 @@ class TestRedisCommands:
assert isinstance(slowlog[0]['start_time'], int)
assert isinstance(slowlog[0]['duration'], int)
+ assert isinstance(slowlog[0]['client_address'], str)
+ assert isinstance(slowlog[0]['client_name'], str)
+
def test_slowlog_get_limit(self, r, slowlog):
assert r.slowlog_reset()
r.get('foo')