Example #1
0
 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)
Example #2
0
 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)
Example #3
0
 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)
Example #4
0
 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)