(type, channel, data, pattern=None)
| 53 | |
| 54 | |
| 55 | def make_message(type, channel, data, pattern=None): |
| 56 | return { |
| 57 | "type": type, |
| 58 | "pattern": pattern and pattern.encode("utf-8") or None, |
| 59 | "channel": channel and channel.encode("utf-8") or None, |
| 60 | "data": data.encode("utf-8") if isinstance(data, str) else data, |
| 61 | } |
| 62 | |
| 63 | |
| 64 | def make_subscribe_test_data(pubsub, type): |
no test coverage detected