diff options
author | kaiix <kvn.hou@gmail.com> | 2021-09-16 02:21:35 +0800 |
---|---|---|
committer | Asif Saif Uddin <auvipy@gmail.com> | 2021-09-16 20:50:28 +0600 |
commit | 580b5219cc50cad278c4b664d0e0f85e37a5e9ea (patch) | |
tree | 8ba3f392fba69c03669c862ab4aa9c536a5fc0c7 /t | |
parent | 07bab02bc3a62c82103993cc1d214d6cd608ef6c (diff) | |
download | kombu-580b5219cc50cad278c4b664d0e0f85e37a5e9ea.tar.gz |
Fix: check redis response type
Diffstat (limited to 't')
-rw-r--r-- | t/unit/transport/test_redis.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/unit/transport/test_redis.py b/t/unit/transport/test_redis.py index 4222d244..cbf37db8 100644 --- a/t/unit/transport/test_redis.py +++ b/t/unit/transport/test_redis.py @@ -576,6 +576,12 @@ class test_Channel: assert self.channel._receive_one(self.channel.subclient) is None + def test_receive_invalid_response_type(self): + s = self.channel.subclient = Mock() + for resp in ['foo', None]: + s.parse_response.return_value = resp + assert self.channel._receive_one(self.channel.subclient) is None + def test_receive_connection_has_gone(self): def _receive_one(c): c.connection = None |