project/kiwipycon/registration/tests.py
author Madhusudan.C.S <madhusudancs@gmail.com>
Wed, 11 Nov 2009 15:36:08 +0530
changeset 23 3cb3f853a193
parent 1 fda1c66b25f9
permissions -rw-r--r--
Moved ACCOUNT_ACTIVATION_DAYS to settings.py and added name as a template variable.



def test_save_to_pdf():
    """
    >>> from .pdf import save_invoice
    >>> from django.db.models.loading import get_model
    >>> userModel =  get_model('auth', 'user')
    >>> user = userModel(username='joe', email='joe@gmail.com',
    ...         first_name='Joe', last_name='Bloggs')
    >>> user.save()
    >>> regModel =  get_model('registration', 'registration')
    >>> registration = regModel(registrant=user, amount=40,
    ...          slug='NZPYCON-0001')
    >>> registration.save()

    >>> save_invoice(user, registration, 'registration/invoice.html')

    """
    pass