summaryrefslogtreecommitdiff
path: root/tests/test_monitor.py
diff options
context:
space:
mode:
authorDoug Kisabaka <dougk7@gmail.com>2011-09-08 15:04:30 +0200
committerRoey Prat <roey.prat@redislabs.com>2019-02-25 15:46:45 +0200
commit9aba44f4bea76885899ff8f11252f4fb6cde9118 (patch)
tree3ee53276c8a2ca46f7b2ba4da7404d2f76ae8709 /tests/test_monitor.py
parent31519e4ccef49fb59254ee5524007c81faa7e850 (diff)
downloadredis-py-9aba44f4bea76885899ff8f11252f4fb6cde9118.tar.gz
Added support for the monitor command.
Diffstat (limited to 'tests/test_monitor.py')
-rw-r--r--tests/test_monitor.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_monitor.py b/tests/test_monitor.py
new file mode 100644
index 0000000..da0c992
--- /dev/null
+++ b/tests/test_monitor.py
@@ -0,0 +1,10 @@
+from __future__ import unicode_literals
+
+
+class TestPipeline(object):
+ def test_monitor(self, r):
+ with r.monitor() as m:
+ r.ping()
+ response = m.next_command()
+ assert set(response.keys()) == {'time', 'db', 'client_address',
+ 'client_port', 'command'}