def test_parse_message(self): actual = SMB2CreateTimewarpToken() data = b"\x00\x80\x3e\xd5\xde\xb1\x9d\x01" data = actual.unpack(data) assert len(actual) == 8 assert data == b"" assert actual['timestamp'].get_value() == datetime.utcfromtimestamp(0)
def test_create_message(self): message = SMB2CreateTimewarpToken() message['timestamp'] = datetime.utcfromtimestamp(0) expected = b"\x00\x80\x3e\xd5\xde\xb1\x9d\x01" actual = message.pack() assert len(message) == 8 assert actual == expected