def testMommyPaymentDelayExcluding(self): G(Attendee, event=self.attendance_event, user=self.user) not_paid = PaymentReminder.not_paid(self.event_payment) self.assertEqual([self.user], not_paid) G(PaymentDelay, payment=self.event_payment, user=self.user, valid_to=timezone.now() + timedelta(days=1)) not_paid = PaymentReminder.not_paid(self.event_payment) self.assertFalse(not_paid)
def testEventMommyPaid(self): G(Attendee, event=self.attendance_event, user=self.user) G(PaymentRelation, payment=self.event_payment, user=self.user, payment_price=self.payment_price) not_paid = PaymentReminder.not_paid(self.event_payment) self.assertFalse(not_paid)
def testEventMommyNotPaid(self): user1 = G(User) user2 = G(User) G(Attendee, event=self.attendance_event, user=user1) G(Attendee, event=self.attendance_event, user=user2) self.simulate_user_payment(user1) not_paid = PaymentReminder.not_paid(self.event_payment) self.assertEqual([user2], not_paid)
def test_event_mommy_paid(self): user1 = G(User) user2 = G(User) G(Attendee, event=self.attendance_event, user=user1) G(Attendee, event=self.attendance_event, user=user2) self.simulate_user_payment(user1) self.simulate_user_payment(user2) not_paid = PaymentReminder.not_paid(self.event_payment) self.assertFalse(not_paid)
def testEventMommyPaidWithDelays(self): user1 = G(User) user2 = G(User) user3 = G(User) G(Attendee, event=self.attendance_event, user=user1) G(Attendee, event=self.attendance_event, user=user2) G(Attendee, event=self.attendance_event, user=user3) G(PaymentDelay, payment=self.event_payment, user=user2, valid_to=timezone.now() + timedelta(days=1)) self.simulate_user_payment(user3) not_paid = PaymentReminder.not_paid(self.event_payment) self.assertEqual([user1], not_paid)
def testEventMommyNotPaidMailAddress(self): G(Attendee, event=self.attendance_event, user=self.user) not_paid_email = PaymentReminder.not_paid_mail_addresses( self.event_payment) self.assertEqual([self.user.email], not_paid_email)
def testEventMommyNotPaid(self): G(Attendee, event=self.attendance_event, user=self.user) attendees = [attendee.user for attendee in Attendee.objects.all()] not_paid = PaymentReminder.not_paid(self.event_payment) self.assertEqual(attendees, not_paid)