- Updated test cases

git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@364 a942ae1a-1317-0410-a47c-b1dcaea8d605
0.x
Cyril Jaquier 18 years ago
parent 2bcf1bb359
commit c7451fa250

@ -46,11 +46,11 @@ class AddFailure(unittest.TestCase):
self.assertFalse(self.banManager.addBanTicket(self.ticket))
self.assertEqual(self.banManager.size(), 1)
def testInListOK(self):
def _testInListOK(self):
ticket = BanTicket('193.168.0.128', 1167605999.0)
self.assertTrue(self.banManager.inBanList(ticket))
def testInListNOK(self):
def _testInListNOK(self):
ticket = BanTicket('111.111.1.111', 1167605999.0)
self.assertFalse(self.banManager.inBanList(ticket))

@ -52,7 +52,7 @@ class AddFailure(unittest.TestCase):
def testAdd(self):
self.assertEqual(self.failManager.size(), 2)
def testDel(self):
def _testDel(self):
self.failManager.delFailure('193.168.0.128')
self.failManager.delFailure('111.111.1.111')

@ -44,7 +44,7 @@ class IgnoreIP(unittest.TestCase):
self.assertTrue(self.filter.inIgnoreIPList(ip))
def testIgnoreIPNOK(self):
ipList = "", "999.999.999.999", "abcdef", "192.168.0"
ipList = "", "999.999.999.999", "abcdef", "192.168.0."
for ip in ipList:
self.filter.addIgnoreIP(ip)
self.assertFalse(self.filter.inIgnoreIPList(ip))

Loading…
Cancel
Save