mirror of https://github.com/fail2ban/fail2ban
Added useDns flag to testcase
parent
b48fa9b6af
commit
11ad2b6125
|
@ -222,12 +222,12 @@ class GetFailures(unittest.TestCase):
|
||||||
|
|
||||||
class DNSUtilsTests(unittest.TestCase):
|
class DNSUtilsTests(unittest.TestCase):
|
||||||
|
|
||||||
def testTextToIp(self):
|
def testTextToIp(self, useDns):
|
||||||
# Bogus addresses which should have no DNS matches
|
# Bogus addresses which should have no DNS matches
|
||||||
bogus = [
|
bogus = [
|
||||||
'doh1.2.3.4.buga.xxxxx.yyy.invalid',
|
'doh1.2.3.4.buga.xxxxx.yyy.invalid',
|
||||||
'1.2.3.4.buga.xxxxx.yyy.invalid',
|
'1.2.3.4.buga.xxxxx.yyy.invalid',
|
||||||
]
|
]
|
||||||
for s in bogus:
|
for s in bogus:
|
||||||
res = DNSUtils.textToIp(s)
|
res = DNSUtils.textToIp(s, useDns)
|
||||||
self.assertEqual(res, [])
|
self.assertEqual(res, [])
|
||||||
|
|
Loading…
Reference in New Issue