def test_ip_parser_not_ip(self): from StixParser import ip_parser not_ip = "trololololo" expected_value = not_ip result = ip_parser(expected_value) assert result == expected_value, self.err_msg.format( expected_value, result)
def test_ip_parser(self): from StixParser import ip_parser ip = "IP-1-2-3-4" expected_ip = "1.2.3.4" result = ip_parser(ip) assert result == expected_ip, self.err_msg.format(expected_ip, result)