def ipdst_adrExists(self): src_ref = '83.78.233.252' dst_ref = '181.149.152.176' ref_pkt = inet.IP(src=src_ref, dst='124.233.255.79') mac_pkt = inet.IP(src=src_ref, dst=dst_ref) data = lib.build_mock_dict() pp.ip_dst_change(mac_pkt, data) self.assertTrue( lib.compare_mac_pkts(ref_pkt, mac_pkt), msg= (str(ref_pkt) + ' == ' + str(mac_pkt)) )
def ipdst_adrNotExist(self): src_ref = '83.78.233.252' dst_ref = '125.195.213.93' ref_pkt = inet.IP(src=src_ref, dst=dst_ref) mac_pkt = inet.IP(src=src_ref, dst=dst_ref) data = lib.build_mock_dict() pp.ip_dst_change(mac_pkt, data) self.assertTrue( lib.compare_mac_pkts(ref_pkt, mac_pkt), msg= (str(ref_pkt) + ' == ' + str(mac_pkt)) )