def test_get_port_parents_range_udp(self): expected_results = (r'33434', r'udp', ['HIGH_PORTS', 'TRACEROUTE']) options = Namespace() options.port = ('33434', 'udp') results = cgrep.get_services(options, self.db) self.assertEquals(results, expected_results)
def test_get_port_parents_fail(self): expected_results = (r'22', r'tcp', ['TELNET']) options = Namespace() options.port = ('22', 'tcp') results = cgrep.get_services(options, self.db) self.assertNotEquals(results, expected_results)