mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
Merge pull request #996 from yarikoptic/bf/no-dns-module
BF/TST: expect ['error'] as a value if no dns module available
This commit is contained in:
commit
938e6343ea
1 changed files with 11 additions and 3 deletions
|
|
@ -511,6 +511,14 @@ class Transmitter(TransmitterBase):
|
|||
)
|
||||
|
||||
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"]),
|
||||
(0,
|
||||
[
|
||||
|
|
@ -523,9 +531,9 @@ class Transmitter(TransmitterBase):
|
|||
('Currently banned', 0),
|
||||
('Total banned', 0),
|
||||
('Banned IP list', []),
|
||||
('Banned ASN list', []),
|
||||
('Banned Country list', []),
|
||||
('Banned RIR list', [])]
|
||||
('Banned ASN list', value),
|
||||
('Banned Country list', value),
|
||||
('Banned RIR list', value)]
|
||||
)
|
||||
]
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue