mirror of https://github.com/fail2ban/fail2ban
Changed TLDs to invalid domains, in accordance with RFC 2606
parent
a7d47e8b36
commit
9092a63ce5
|
@ -223,11 +223,11 @@ class GetFailures(unittest.TestCase):
|
|||
class DNSUtilsTests(unittest.TestCase):
|
||||
|
||||
def testTextToIp(self):
|
||||
# Bogus addresses which should have no DNS matches
|
||||
bogus = [
|
||||
'doh1.2.3.4.buga.xxxxx.yyy',
|
||||
'1.2.3.4.buga.xxxxx.yyy',
|
||||
'doh1.2.3.4.buga.xxxxx.yyy.invalid',
|
||||
'1.2.3.4.buga.xxxxx.yyy.invalid',
|
||||
]
|
||||
"""Really bogus addresses which should have no matches"""
|
||||
for s in bogus:
|
||||
res = DNSUtils.textToIp(s)
|
||||
self.assertEqual(res, [])
|
||||
|
|
Loading…
Reference in New Issue