Combine ignore cause unitests

pull/930/head
Lee Clemens 2015-02-03 18:02:42 -05:00
parent 3186df55e3
commit aa848a5f9e
1 changed files with 6 additions and 0 deletions

View File

@ -275,6 +275,12 @@ class IgnoreIP(LogCaptureTestCase):
self.filter.addIgnoreIP("93.184.216.34")
self.assertTrue(self._is_logged("Ignore 93.184.216.34"))
def testIgnoreCause(self):
ip = "93.184.216.34"
for ignore_source in ["dns", "ip", "command"]:
self.filter.logIgnoreIp(ip, True, ignore_source=ignore_source)
self.assertTrue(self._is_logged("[%s] Ignore %s by %s" % (self.jail.name, ip, ignore_source)))
class IgnoreIPDNS(IgnoreIP):