diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e0310a0 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1 @@ +"""Unit tests.""" diff --git a/tests/test_battleye_proto.py b/tests/test_battleye_proto.py new file mode 100644 index 0000000..1569898 --- /dev/null +++ b/tests/test_battleye_proto.py @@ -0,0 +1,17 @@ +"""Test the BattlEye protocol.""" + +from unittest import TestCase + +from rcon.battleye.proto import Header + + +HEADER = Header(920575337, 0x00) +BYTES = b'BEi\xdd\xde6\xff\x00' + + +class TestHeader(TestCase): + """Test header object.""" + + def test_header_from_bytes(self): + """Tests header object parsing.""" + self.assertEqual(Header.from_bytes(BYTES), HEADER)