diff --git a/test/test_hpack.py b/test/test_hpack.py index ab28241..b1d0391 100644 --- a/test/test_hpack.py +++ b/test/test_hpack.py @@ -18,6 +18,14 @@ from hpack.hpack import _dict_to_iterable, _to_bytes +def test_to_bytes(): + assert _to_bytes(b"foobar") == b"foobar" + assert _to_bytes("foobar") == b"foobar" + assert _to_bytes(0xABADBABE) == b'2880289470' + assert _to_bytes(True) == b'True' + assert _to_bytes(Encoder()).startswith(b"