Fixed missing argument in tests.

This commit is contained in:
s3lph 2018-09-09 03:26:00 +02:00
parent a466e5109f
commit 660969744c

View file

@ -479,15 +479,18 @@ class DatabaseTest(unittest.TestCase):
'user6': user6.id 'user6': user6.id
}) })
self.assertFalse(db.check_receipt_due(user0)) import logging
self.assertFalse(self.db.check_receipt_due(user1)) logger = logging.getLogger('test')
self.assertTrue(self.db.check_receipt_due(user2))
self.assertTrue(self.db.check_receipt_due(user3)) self.assertFalse(db.check_receipt_due(user0, logger))
self.assertFalse(self.db.check_receipt_due(user4)) self.assertFalse(self.db.check_receipt_due(user1, logger))
self.assertTrue(self.db.check_receipt_due(user5)) self.assertTrue(self.db.check_receipt_due(user2, logger))
self.assertFalse(self.db.check_receipt_due(user6)) self.assertTrue(self.db.check_receipt_due(user3, logger))
self.assertFalse(self.db.check_receipt_due(user4, logger))
self.assertTrue(self.db.check_receipt_due(user5, logger))
self.assertFalse(self.db.check_receipt_due(user6, logger))
with self.assertRaises(TypeError): with self.assertRaises(TypeError):
self.db.check_receipt_due(user7) self.db.check_receipt_due(user7, logger)
def test_create_receipt(self): def test_create_receipt(self):
with self.db as db: with self.db as db: