mirror of https://github.com/fail2ban/fail2ban
Merge pull request #996 from yarikoptic/bf/no-dns-module
BF/TST: expect ['error'] as a value if no dns module availablepull/997/head
commit
938e6343ea
|
@ -511,6 +511,14 @@ class Transmitter(TransmitterBase):
|
||||||
)
|
)
|
||||||
|
|
||||||
def testJailStatusCymru(self):
|
def testJailStatusCymru(self):
|
||||||
|
try:
|
||||||
|
import dns.exception
|
||||||
|
import dns.resolver
|
||||||
|
except ImportError:
|
||||||
|
value = ['error']
|
||||||
|
else:
|
||||||
|
value = []
|
||||||
|
|
||||||
self.assertEqual(self.transm.proceed(["status", self.jailName, "cymru"]),
|
self.assertEqual(self.transm.proceed(["status", self.jailName, "cymru"]),
|
||||||
(0,
|
(0,
|
||||||
[
|
[
|
||||||
|
@ -523,9 +531,9 @@ class Transmitter(TransmitterBase):
|
||||||
('Currently banned', 0),
|
('Currently banned', 0),
|
||||||
('Total banned', 0),
|
('Total banned', 0),
|
||||||
('Banned IP list', []),
|
('Banned IP list', []),
|
||||||
('Banned ASN list', []),
|
('Banned ASN list', value),
|
||||||
('Banned Country list', []),
|
('Banned Country list', value),
|
||||||
('Banned RIR list', [])]
|
('Banned RIR list', value)]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue