Changeset - 0e80e0336c20
[Not reviewed]
0 2 0
Christopher Neugebauer - 8 years ago 2016-04-07 07:17:15
chrisjrn@gmail.com
adds invoice_recipient to AttendeeProfileBase
2 files changed with 18 insertions and 1 deletions:
0 comments (0 inline, 0 general)
registrasion/controllers/invoice.py
Show inline comments
...
 
@@ -75,2 +75,7 @@ class InvoiceController(object):
 

	
 
        # Get the invoice recipient
 
        profile = rego.AttendeeProfileBase.objects.get_subclass(
 
            id=cart.user.attendee.attendeeprofilebase.id,
 
        )
 
        recipient = profile.invoice_recipient()
 
        invoice = rego.Invoice.objects.create(
...
 
@@ -83,3 +88,3 @@ class InvoiceController(object):
 
            due_time=due,
 
            recipient="BOB_THOMAS", # TODO: add recipient generating code
 
            recipient=recipient,
 
        )
registrasion/tests/test_cart.py
Show inline comments
...
 
@@ -25,2 +25,5 @@ class RegistrationCartTestCase(SetTimeMixin, TestCase):
 
    def setUpTestData(cls):
 

	
 
        super(RegistrationCartTestCase, cls).setUpTestData()
 

	
 
        cls.USER_1 = User.objects.create_user(
...
 
@@ -35,2 +38,11 @@ class RegistrationCartTestCase(SetTimeMixin, TestCase):
 

	
 
        attendee1 = rego.Attendee.get_instance(cls.USER_1)
 
        attendee1.save()
 
        profile1 = rego.AttendeeProfileBase.objects.create(attendee=attendee1)
 
        profile1.save()
 
        attendee2 = rego.Attendee.get_instance(cls.USER_2)
 
        attendee2.save()
 
        profile2 = rego.AttendeeProfileBase.objects.create(attendee=attendee2)
 
        profile2.save()
 

	
 
        cls.RESERVATION = datetime.timedelta(hours=1)
0 comments (0 inline, 0 general)