def ipsrc_adrExists(self): src_ref = '181.149.152.176' dst_ref = '125.195.213.93' ref_pkt = inet.IP(src='124.233.255.79', dst=dst_ref) mac_pkt = inet.IP(src=src_ref, dst=dst_ref) data = lib.build_mock_dict() pp.ip_src_change(mac_pkt, data) self.assertTrue( lib.compare_mac_pkts(ref_pkt, mac_pkt), msg= (str(ref_pkt) + ' == ' + str(mac_pkt)) )
def ipsrc_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_src_change(mac_pkt, data) self.assertTrue( lib.compare_mac_pkts(ref_pkt, mac_pkt), msg= (str(ref_pkt) + ' == ' + str(mac_pkt)) )