diff --git a/fail2ban/tests/filtertestcase.py b/fail2ban/tests/filtertestcase.py index 62eb0f21..b8e0e04a 100644 --- a/fail2ban/tests/filtertestcase.py +++ b/fail2ban/tests/filtertestcase.py @@ -1872,10 +1872,10 @@ class DNSUtilsNetworkTests(unittest.TestCase): def testIpToName(self): unittest.F2B.SkipIfNoNetwork() res = DNSUtils.ipToName('8.8.4.4') - self.assertEqual(res, 'google-public-dns-b.google.com') + self.assertTrue(res.endswith(('.google', '.google.com'))) # same as above, but with IPAddr: res = DNSUtils.ipToName(IPAddr('8.8.4.4')) - self.assertEqual(res, 'google-public-dns-b.google.com') + self.assertTrue(res.endswith(('.google', '.google.com'))) # invalid ip (TEST-NET-1 according to RFC 5737) res = DNSUtils.ipToName('192.0.2.0') self.assertEqual(res, None)