summaryrefslogtreecommitdiff
path: root/tests/test_monitor.py
diff options
context:
space:
mode:
authorChayim <chayim@users.noreply.github.com>2021-11-11 12:38:27 +0200
committerGitHub <noreply@github.com>2021-11-11 12:38:27 +0200
commit6a293e685d27894bc99ea4c0c7312c81f099ca45 (patch)
tree1618e553a5a7010782b5dc6574fc40d827960bd4 /tests/test_monitor.py
parentec172e74bbccd32627835d67eddac704fe9ba31b (diff)
downloadredis-py-6a293e685d27894bc99ea4c0c7312c81f099ca45.tar.gz
Fixes to allow --redis-url to pass through all tests (#1700)
Diffstat (limited to 'tests/test_monitor.py')
-rw-r--r--tests/test_monitor.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/test_monitor.py b/tests/test_monitor.py
index bbb7fb7..a8a535b 100644
--- a/tests/test_monitor.py
+++ b/tests/test_monitor.py
@@ -1,4 +1,8 @@
-from .conftest import wait_for_command
+from .conftest import (
+ skip_if_redis_enterprise,
+ skip_ifnot_redis_enterprise,
+ wait_for_command
+)
class TestMonitor:
@@ -40,6 +44,7 @@ class TestMonitor:
response = wait_for_command(r, m, 'GET foo\\\\x92')
assert response['command'] == 'GET foo\\\\x92'
+ @skip_if_redis_enterprise
def test_lua_script(self, r):
with r.monitor() as m:
script = 'return redis.call("GET", "foo")'
@@ -49,3 +54,11 @@ class TestMonitor:
assert response['client_type'] == 'lua'
assert response['client_address'] == 'lua'
assert response['client_port'] == ''
+
+ @skip_ifnot_redis_enterprise
+ def test_lua_script_in_enterprise(self, r):
+ with r.monitor() as m:
+ script = 'return redis.call("GET", "foo")'
+ assert r.eval(script, 0) is None
+ response = wait_for_command(r, m, 'GET foo')
+ assert response is None