def test_billing_cycle_last_bill(self): "models.Bill.last_bill()" reminder_bill = send_reminder(self.membership) last_bill = self.cycle.bill_set.latest("due_date") self.assertEquals(last_bill.id, reminder_bill.id) self.assertNotEquals(last_bill.id, self.bill.id) reminder_bill.delete()
def test_bill_is_reminder(self): "models.bill.is_reminder()" reminder_bill = send_reminder(self.membership) self.assertTrue(reminder_bill.is_reminder()) self.assertEqual(reminder_bill.reminder_count, 1) self.assertFalse(self.bill.is_reminder()) self.assertEqual(self.bill.reminder_count, 0) reminder_bill.delete()