# Path: replayenhancer/ParticipantPacket.py
# class ParticipantPacket(Packet):
#     """
#     Creates an object from a participant info string packet.
# 
#     The participant info string packet has a length of 1347, and is
#     packet type 1.
#     """
#     def __init__(self, packet_data):
#         self.data_hash = md5(packet_data).hexdigest()
#         unpacked_data = self._unpack_data(packet_data)
# 
#         self.build_version_number = int(unpacked_data.popleft())
# 
#         self._test_packet_type(unpacked_data.popleft())
# 
#         self.car_name = str(
#             unpacked_data.popleft(),
#             encoding='utf-8',
#             errors='strict').split('\x00', 1)[0]
#         self.car_class_name = str(
#             unpacked_data.popleft(),
#             encoding='utf-8',
#             errors='strict').split('\x00', 1)[0]
#         self.track_location = str(
#             unpacked_data.popleft(),
#             encoding='utf-8',
#             errors='strict').split('\x00', 1)[0]
#         self.track_variation = str(
#             unpacked_data.popleft(),
#             encoding='utf-8',
#             errors='strict').split('\x00', 1)[0]
# 
#         self.name = list()
#         for _ in range(16):
#             self.name.append(
#                 str(
#                     unpacked_data.popleft(),
#                     encoding='utf-8',
#                     errors='strict').split('\x00', 1)[0])
# 
#     @property
#     def packet_type(self):
#         return 1
# 
#     @property
#     def _packet_string(self):
#         packet_string = "HB64s64s64s64s"
#         packet_string += "64s"*16
#         packet_string += "64x"
# 
#         return packet_string
# 
#     def __str__(self):
#         return "ParticipantPacket"


import unittest
from hashlib import md5
from struct import pack
from replayenhancer.ParticipantPacket import ParticipantPacket
        from struct import error

        self.assertListEqual(instance.name, expected_result)

    def test_property_name_split_on_null(self):
        instance = ParticipantPacket(self.binary_data(
            name=[name+'\x00Garbage Data' for name in self.expected_name]))
        expected_result = self.expected_name
        self.assertListEqual(instance.name, expected_result)

    def test_property_packet_type(self):
        instance = ParticipantPacket(self.binary_data())
        expected_result = self.expected_packet_type
        self.assertEqual(instance.packet_type, expected_result)

    def test_property_track_location(self):
        instance = ParticipantPacket(self.binary_data())
        expected_result = self.expected_track_location
        self.assertEqual(instance.track_location, expected_result)

    def test_property_track_location_split_on_null(self):
        instance = ParticipantPacket(self.binary_data(
            track_location=self.expected_track_location + "\x00Garbage Data"))
        expected_result = self.expected_track_location
        self.assertEqual(instance.track_location, expected_result)

    def test_property_track_variation(self):
        instance = ParticipantPacket(self.binary_data())
        expected_result = self.expected_track_variation
        self.assertEqual(instance.track_variation, expected_result)

    def test_property_track_variation_split_on_null(self):

# Path: replayenhancer/ParticipantPacket.py
# class ParticipantPacket(Packet):
#     """
#     Creates an object from a participant info string packet.
# 
#     The participant info string packet has a length of 1347, and is
#     packet type 1.
#     """
#     def __init__(self, packet_data):
#         self.data_hash = md5(packet_data).hexdigest()
#         unpacked_data = self._unpack_data(packet_data)
# 
#         self.build_version_number = int(unpacked_data.popleft())
# 
#         self._test_packet_type(unpacked_data.popleft())
# 
#         self.car_name = str(
#             unpacked_data.popleft(),
#             encoding='utf-8',
#             errors='strict').split('\x00', 1)[0]
#         self.car_class_name = str(
#             unpacked_data.popleft(),
#             encoding='utf-8',
#             errors='strict').split('\x00', 1)[0]
#         self.track_location = str(
#             unpacked_data.popleft(),
#             encoding='utf-8',
#             errors='strict').split('\x00', 1)[0]
#         self.track_variation = str(
#             unpacked_data.popleft(),
#             encoding='utf-8',
#             errors='strict').split('\x00', 1)[0]
# 
#         self.name = list()
#         for _ in range(16):
#             self.name.append(
#                 str(
#                     unpacked_data.popleft(),
#                     encoding='utf-8',
#                     errors='strict').split('\x00', 1)[0])
# 
#     @property
#     def packet_type(self):
#         return 1
# 
#     @property
#     def _packet_string(self):
#         packet_string = "HB64s64s64s64s"
#         packet_string += "64s"*16
#         packet_string += "64x"
# 
#         return packet_string
# 
#     def __str__(self):
#         return "ParticipantPacket"


# Path: test/test_ParticipantPacket.py
import unittest
from hashlib import md5
from struct import pack
from replayenhancer.ParticipantPacket import ParticipantPacket
        from struct import error

        self.assertListEqual(instance.name, expected_result)

    def test_property_name_split_on_null(self):
        instance = ParticipantPacket(self.binary_data(
            name=[name+'\x00Garbage Data' for name in self.expected_name]))
        expected_result = self.expected_name
        self.assertListEqual(instance.name, expected_result)

    def test_property_packet_type(self):
        instance = ParticipantPacket(self.binary_data())
        expected_result = self.expected_packet_type
        self.assertEqual(instance.packet_type, expected_result)

    def test_property_track_location(self):
        instance = ParticipantPacket(self.binary_data())
        expected_result = self.expected_track_location
        self.assertEqual(instance.track_location, expected_result)

    def test_property_track_location_split_on_null(self):
        instance = ParticipantPacket(self.binary_data(
            track_location=self.expected_track_location + "\x00Garbage Data"))
        expected_result = self.expected_track_location
        self.assertEqual(instance.track_location, expected_result)

    def test_property_track_variation(self):
        instance = ParticipantPacket(self.binary_data())
        expected_result = self.expected_track_variation
        self.assertEqual(instance.track_variation, expected_result)

    def test_property_track_variation_split_on_null(self):

        instance = ParticipantPacket(self.binary_data(
