def test_real_credit_out_of_date (self): """ Test out of date credit. """ acc = Account.objects.get(name=self.account_name) p = Purchase(account=acc, startDate=self.startdate, endDate=self.enddate, initial=1, reserved=1, available=1, price=1 ) self.assertEqual (0, p.real_credit() )
def test_real_credit_future (self): """ Test credit not yet valid. """ acc = Account.objects.get(name=self.account_name) p = Purchase(account=acc, startDate=self.futuredate, endDate=self.enddate, initial=1, reserved=1, available=1, price=1 ) self.assertEqual (0, p.real_credit() )