2020-06-30 14:02:55 +00:00
|
|
|
async def test_send_produces_bytes(smc):
|
2020-06-30 13:09:04 +00:00
|
|
|
channel, type, message = 0, 0, b"abc"
|
|
|
|
|
|
|
|
payload = await smc.send(channel, type, message)
|
|
|
|
assert isinstance(payload, bytes)
|
|
|
|
|
2020-06-30 14:02:55 +00:00
|
|
|
|
|
|
|
# async def test_recv_context_manager(smc):
|
|
|
|
# channel, type, message = 0, 0, b"abc"
|
|
|
|
|
|
|
|
# payload = await smc.send(channel, type, message)
|
|
|
|
# assert isinstance(payload, bytes)
|
|
|
|
|
|
|
|
# async with smc.recv(payload) as response:
|
|
|
|
# assert response.channel == channel
|
|
|
|
# assert response.type == type
|
|
|
|
# assert response.message == message
|