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