def test_add_reverse_iptag_then_locate_tag(self): """ check that asking for a reverse iptag for a specific machine vertex works """ tag_info = Tags() reverse_iptag = ReverseIPTag("", 1, 23, 0, 0, 1, 1) machine_vertex = SimpleMachineVertex(None, "") tag_info.add_reverse_ip_tag(reverse_iptag, machine_vertex) gotton_tag = tag_info.get_reverse_ip_tags_for_vertex(machine_vertex) self.assertEqual(gotton_tag[0], reverse_iptag)
def test_add_reverse_iptag_then_not_locate_tag(self): """ check that asking for a reverse iptag with a incorrect machine vertex will cause a none returned """ tag_info = Tags() reverse_iptag = ReverseIPTag("", 1, 23, 0, 0, 1, 1) machine_vertex = SimpleMachineVertex(None, "") machine_vertex2 = SimpleMachineVertex(None, "") tag_info.add_reverse_ip_tag(reverse_iptag, machine_vertex2) gotton_tag = tag_info.get_reverse_ip_tags_for_vertex(machine_vertex) self.assertEqual(gotton_tag, None)