project/scipycon/registration/tests.py
changeset 94 87e77aa18610
equal deleted inserted replaced
93:e86755df35da 94:87e77aa18610
       
     1 
       
     2 
       
     3 def test_save_to_pdf():
       
     4     """
       
     5     >>> from .pdf import save_invoice
       
     6     >>> from django.db.models.loading import get_model
       
     7     >>> userModel =  get_model('auth', 'user')
       
     8     >>> user = userModel(username='joe', email='joe@gmail.com',
       
     9     ...         first_name='Joe', last_name='Bloggs')
       
    10     >>> user.save()
       
    11     >>> regModel =  get_model('registration', 'registration')
       
    12     >>> registration = regModel(registrant=user, amount=40,
       
    13     ...          slug='NZPYCON-0001')
       
    14     >>> registration.save()
       
    15 
       
    16     >>> save_invoice(user, registration, 'registration/invoice.html')
       
    17 
       
    18     """
       
    19     pass