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