Exemple #1
0
 def testDeleteNotFound(self):
     self.assertRaises(repository.RepositoryException,
             repository.InvoiceRepository().delete, 22)
Exemple #2
0
 def testGetByIdNotFound(self):
     self.assertEqual(repository.InvoiceRepository().getById(22),
             None, "Powinno wyjść None")
Exemple #3
0
 def testGetByIdInvitemsLen(self):
     self.assertEqual(len(repository.InvoiceRepository().getById(1).invitems),
             3, "Powinno wyjść 2")
Exemple #4
0
 def testGetByIdInstance(self):
     invoice = repository.InvoiceRepository().getById(1)
     self.assertIsInstance(invoice, repository.Invoice, "Objekt nie jest klasy Invoice")