1
0
Fork 0
forked from s3lph/matemat

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
})
self.assertFalse(db.check_receipt_due(user0))
self.assertFalse(self.db.check_receipt_due(user1))
self.assertTrue(self.db.check_receipt_due(user2))
self.assertTrue(self.db.check_receipt_due(user3))
self.assertFalse(self.db.check_receipt_due(user4))
self.assertTrue(self.db.check_receipt_due(user5))
self.assertFalse(self.db.check_receipt_due(user6))
import logging
logger = logging.getLogger('test')
self.assertFalse(db.check_receipt_due(user0, logger))
self.assertFalse(self.db.check_receipt_due(user1, logger))
self.assertTrue(self.db.check_receipt_due(user2, logger))
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):
self.db.check_receipt_due(user7)
self.db.check_receipt_due(user7, logger)
def test_create_receipt(self):
with self.db as db: