From eb17b68641aa7b3187205cd7818148d4ee1562cd Mon Sep 17 00:00:00 2001 From: Lee Clemens Date: Mon, 2 Feb 2015 14:03:35 -0500 Subject: [PATCH] fix test for invalid IP --- fail2ban/tests/filtertestcase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fail2ban/tests/filtertestcase.py b/fail2ban/tests/filtertestcase.py index 1146cef8..32c89dbf 100644 --- a/fail2ban/tests/filtertestcase.py +++ b/fail2ban/tests/filtertestcase.py @@ -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):