diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2010-06-22 10:04:38 -0700 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2010-06-22 10:04:38 -0700 |
commit | fb0a249f4a39268e089825a15184d3d1b7ddac62 (patch) | |
tree | 79239bb869db6a951d70fd7dc70cb33189db5363 /tests/server_commands.py | |
parent | 91441933d3333528f2749a888e2c5db6106493fc (diff) | |
download | redis-py-fb0a249f4a39268e089825a15184d3d1b7ddac62.tar.gz |
changed return type of listen() -- it's now a dictionary with the following keys: type -- the message type, data -- the actual message, channel -- the channel the message was delivered on. if the message was triggered due to a pattern matched from psubscribe, then a 4th key will be present: pattern, indicating the pattern that was matched.
Diffstat (limited to 'tests/server_commands.py')
-rw-r--r-- | tests/server_commands.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/server_commands.py b/tests/server_commands.py index 0a2acf1..b6ae82b 100644 --- a/tests/server_commands.py +++ b/tests/server_commands.py @@ -1072,7 +1072,9 @@ class ServerCommandsTestCase(unittest.TestCase): if len(messages) == num_messages_to_expect: break sent_types, sent_channels = {}, {} - for msg_type, channel, _ in messages: + for msg in messages: + msg_type = msg['type'] + channel = msg['channel'] sent_types.setdefault(msg_type, 0) sent_types[msg_type] += 1 if msg_type == 'message': |