project/kiwipycon/registration/tests.py
changeset 1 fda1c66b25f9
equal deleted inserted replaced
0:9a77edda77b7 1:fda1c66b25f9
       
     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