Example #1
0
 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() )
Example #2
0
 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() )