PortLookup: fix tests

This commit is contained in:
James Lu 2016-05-06 21:23:26 -07:00
parent 311822d355
commit e70db1ca72

View File

@ -35,11 +35,14 @@ class PortLookupTestCase(PluginTestCase):
plugins = ('PortLookup',)
def testPort(self):
self.assertRegexp('port 22', 'SSH.*?Official.*?TCP')
self.assertRegexp('port 22', 'SSH.*?TCP.*?Official')
# Some entries in the list are defined as port ranges (i.e.
# 6665-6669); we have to split them manually.
self.assertRegexp('port 6667', 'Internet Relay Chat')
self.assertError('port 77777') # Port numbers can't be >65535
# Wikipedia notes that ports 49152-65535 cannot be registered
# with IANA, so we'll leave a note here too.
self.assertRegexp('port 65300', 'cannot be registered')