fixes coverage of dbmaxmatches = 0

pull/2402/head
sebres 2019-04-18 22:44:14 +02:00
parent 46fc4c4615
commit 3e5b8fdc6a
1 changed files with 1 additions and 0 deletions

View File

@ -380,6 +380,7 @@ class DatabaseTest(LogCaptureTestCase):
maxmatches=0)
self.assertEqual(len(ticket.getMatches()), 0)
# dbmaxmatches = 0, should retrieve 0 matches by last ban:
ticket.setMatches(["1","2","3"])
self.db.maxMatches = 0;
self.db.addBan(self.jail, ticket)
ticket = self.db.getCurrentBans(self.jail, "127.0.0.1", fromtime=MyTime.time()-100)