

def test_network_load(self):
    '\n        Test that the code that loads network layer packets from the\n        top level works.\n        '
    self.init_capfile(layers=2)
    for packet in self.capfile.packets:
        for field in ['src', 'dst', 'v', 'hl', 'tos', 'ttl']:
            ipkt = packet.packet.payload
            self.assertTrue(hasattr(ipkt, field), 'invalid packet!')

dataset/ETHPy150Open kisom/pypcapfile/pcapfile/test/savefile_test.py TestCase.test_network_load/original