Example #1
0
 def test_get_number(self):
     cinv = CancelInvoice()
     cinv.project = MagicMock(code="PRO1")
     cinv.customer = MagicMock(code="CLI1")
     cinv.taskDate = datetime.date(1969, 07, 31)
     cinv.set_sequenceNumber(15)
     cinv.set_number()
     self.assertEqual(cinv.number, u"PRO1_CLI1_A15_0769")
Example #2
0
 def test_set_name(self):
     cinv = CancelInvoice()
     cinv.set_sequenceNumber(5)
     cinv.set_name()
     self.assertEqual(cinv.name, u"Avoir 5")