Add __init__ setup, pytest-trio and split up tests
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Luke Murphy
2020-06-30 16:02:55 +02:00
parent 1fb81002d8
commit eb03ff96ad
4 changed files with 41 additions and 5 deletions

View File

@ -1,10 +1,17 @@
async def test_send_recv(smc):
async def test_send_produces_bytes(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
# 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