summaryrefslogtreecommitdiff
path: root/tests/test_pubsub.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_pubsub.py')
-rw-r--r--tests/test_pubsub.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_pubsub.py b/tests/test_pubsub.py
index fee04da..2644d60 100644
--- a/tests/test_pubsub.py
+++ b/tests/test_pubsub.py
@@ -531,3 +531,11 @@ class TestPubSubConnectionKilled(object):
r.client_kill_filter(_id=client['id'])
with pytest.raises(ConnectionError):
wait_for_message(p)
+
+
+class TestPubSubTimeouts(object):
+ def test_get_message_with_timeout_returns_none(self, r):
+ p = r.pubsub()
+ p.subscribe('foo')
+ assert wait_for_message(p) == make_message('subscribe', 'foo', 1)
+ assert p.get_message(timeout=0.01) is None