mirror of https://github.com/fail2ban/fail2ban
fix test for invalid IP
parent
fef031b3cd
commit
eb17b68641
|
@ -1014,7 +1014,8 @@ class DNSUtilsTests(unittest.TestCase):
|
|||
def testIpToName(self):
|
||||
res = DNSUtils.ipToName('66.249.66.1')
|
||||
self.assertEqual(res, 'crawl-66-249-66-1.googlebot.com')
|
||||
self.assertRaises(Exception, DNSUtils.ipToName, ['10.0.0.0'])
|
||||
res = DNSUtils.ipToName('10.0.0.0')
|
||||
self.assertEqual(res, None)
|
||||
|
||||
class JailTests(unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Reference in New Issue