You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

21 lines
500 B

"""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)
def test_header_to_bytes(self):
"""Tests header object parsing."""
self.assertEqual(bytes(HEADER), BYTES)