diff options
Diffstat (limited to 'tests/test_monitor.py')
-rw-r--r-- | tests/test_monitor.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_monitor.py b/tests/test_monitor.py index 0e39ec0..ee5dc6e 100644 --- a/tests/test_monitor.py +++ b/tests/test_monitor.py @@ -34,6 +34,13 @@ class TestMonitor(object): response = wait_for_command(r, m, 'GET foo\\x92') assert response['command'] == 'GET foo\\x92' + def test_command_with_escaped_data(self, r): + with r.monitor() as m: + byte_string = b'foo\\x92' + r.get(byte_string) + response = wait_for_command(r, m, 'GET foo\\\\x92') + assert response['command'] == 'GET foo\\\\x92' + def test_lua_script(self, r): with r.monitor() as m: script = 'return redis.call("GET", "foo")' |