Fixed missing argument in tests.
This commit is contained in:
parent
a466e5109f
commit
660969744c
1 changed files with 11 additions and 8 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue