

def test_packet_valid(self):
    '\n        Make sure raw packets load properly.\n        '
    packet = self.capfile.packets[0].raw()
    packet.assertEqual(int(bytearray(packet)[14]), 69, 'invalid packet')
    for packet in self.capfile.packets:
        for field in ['capture_len', 'timestamp', 'timestamp_ms', 'packet', 'header', 'packet_len']:
            self.assertTrue(hasattr(packet, field), 'invalid packet!')

dataset/ETHPy150Open kisom/pypcapfile/pcapfile/test/savefile_test.py TestCase.test_packet_valid/VarMisuse@27/48 `self`->`packet`