Add tests for Pubsub

- `test_handle_subscription`
- `test_handle_talk`
- `test_message_all_peers`
This commit is contained in:
mhchia
2019-07-30 13:33:48 +08:00
parent 3a42d72cd9
commit 9683d5e8ac
2 changed files with 105 additions and 8 deletions

View File

@ -323,7 +323,7 @@ class Pubsub:
"""
# Broadcast message
for _, stream in self.peers.items():
for stream in self.peers.values():
# Write message to stream
await stream.write(raw_msg)