summaryrefslogtreecommitdiff
path: root/tests/test_monitor.py
diff options
context:
space:
mode:
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