From 0463518d28a4146bce7c3bb516951c77bf0c392a Mon Sep 17 00:00:00 2001 From: Lee Clemens Date: Mon, 2 Feb 2015 13:14:53 -0500 Subject: [PATCH] Add testcase for DNSUtils.ipToName --- fail2ban/tests/filtertestcase.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fail2ban/tests/filtertestcase.py b/fail2ban/tests/filtertestcase.py index 47e88067..2274b9e5 100644 --- a/fail2ban/tests/filtertestcase.py +++ b/fail2ban/tests/filtertestcase.py @@ -996,6 +996,8 @@ class DNSUtilsTests(unittest.TestCase): self.assertEqual(res, ['93.184.216.34']) res = DNSUtils.textToIp('www.example.com', 'yes') self.assertEqual(res, ['93.184.216.34']) + res = DNSUtils.ipToName('66.249.66.1') + self.assertEqual(res, 'crawl-66-249-66-1.googlebot.com') def testTextToIp(self): # Test hostnames