mirror of https://github.com/fail2ban/fail2ban
fixed testCymruInfoNxdomain (since cymru does not provide ASN mapping info for "10.0.0.0" anymore)
parent
205edff65d
commit
9f55ed86df
|
@ -106,13 +106,12 @@ class StatusExtendedCymruInfo(unittest.TestCase):
|
||||||
"country": ["nxdomain"],
|
"country": ["nxdomain"],
|
||||||
"rir": ["nxdomain"]})
|
"rir": ["nxdomain"]})
|
||||||
|
|
||||||
# even for private IPs ASNs defined
|
|
||||||
# Since it outputs for all active tickets we would get previous results
|
# Since it outputs for all active tickets we would get previous results
|
||||||
# and new ones
|
# and new ones
|
||||||
ticket = BanTicket("10.0.0.0", 1167606000.0)
|
ticket = BanTicket("8.0.0.0", 1167606000.0)
|
||||||
self.assertTrue(self.__banManager.addBanTicket(ticket))
|
self.assertTrue(self.__banManager.addBanTicket(ticket))
|
||||||
cymru_info = self.__banManager.getBanListExtendedCymruInfo()
|
cymru_info = self.__banManager.getBanListExtendedCymruInfo()
|
||||||
assert_dict_equal(cymru_info,
|
assert_dict_equal(cymru_info,
|
||||||
{"asn": ["nxdomain", "4565",],
|
{"asn": ["nxdomain", "3356",],
|
||||||
"country": ["nxdomain", "unknown"],
|
"country": ["nxdomain", "US"],
|
||||||
"rir": ["nxdomain", "other"]})
|
"rir": ["nxdomain", "arin"]})
|
||||||
|
|
Loading…
Reference in New Issue