Spec out first steps, nothing works yet
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
8
test/conftest.py
Normal file
8
test/conftest.py
Normal file
@ -0,0 +1,8 @@
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def smc():
|
||||
from simple_message_channels import SimpleMessageChannel
|
||||
|
||||
return SimpleMessageChannel()
|
10
test/test_smc.py
Normal file
10
test/test_smc.py
Normal file
@ -0,0 +1,10 @@
|
||||
async def test_send_recv(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
|
Reference in New Issue
Block a user