|
|
|
@ -67,7 +67,7 @@ class DatabaseTest(unittest.TestCase):
|
|
|
|
|
def testUpdateDb(self):
|
|
|
|
|
shutil.copyfile('fail2ban/tests/files/database_v1.db', self.dbFilename)
|
|
|
|
|
self.db = Fail2BanDb(self.dbFilename)
|
|
|
|
|
self.assertEqual(self.db.getJailNames(), {'DummyJail #29162448 with 0 tickets'})
|
|
|
|
|
self.assertEqual(self.db.getJailNames(), set(['DummyJail #29162448 with 0 tickets']))
|
|
|
|
|
self.assertEqual(self.db.getLogPaths(), {'/tmp/Fail2BanDb_pUlZJh.log'})
|
|
|
|
|
ticket = FailTicket("127.0.0.1", 1388009242.26, [u"abc\n"])
|
|
|
|
|
self.assertEqual(self.db.getBans()[0], ticket)
|
|
|
|
|