Configure pytest
This commit is contained in:
parent
7977d89abf
commit
3c8942b485
4 changed files with 25 additions and 2 deletions
11
tests/test_protocol.py
Normal file
11
tests/test_protocol.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from io import BytesIO
|
||||
|
||||
from srnemqtt.protocol import write as protocol_write
|
||||
|
||||
|
||||
def test_write():
|
||||
fh = BytesIO()
|
||||
protocol_write(fh, b"Hello, World!")
|
||||
fh.seek(0)
|
||||
|
||||
assert fh.read() == b"Hello, World!\x4E\x11"
|
Loading…
Add table
Add a link
Reference in a new issue