author | Parth buch <parth.buch.115@gmail.com> |
Sat, 03 Dec 2011 12:51:00 +0530 | |
branch | 2011 |
changeset 491 | 3c981ecb6b8e |
parent 94 | 87e77aa18610 |
permissions | -rw-r--r-- |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
1 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
2 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
3 |
def test_save_to_pdf(): |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
4 |
""" |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
5 |
>>> from .pdf import save_invoice |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
6 |
>>> from django.db.models.loading import get_model |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
7 |
>>> userModel = get_model('auth', 'user') |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
8 |
>>> user = userModel(username='joe', email='joe@gmail.com', |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
9 |
... first_name='Joe', last_name='Bloggs') |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
10 |
>>> user.save() |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
11 |
>>> regModel = get_model('registration', 'registration') |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
12 |
>>> registration = regModel(registrant=user, amount=40, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
13 |
... slug='NZPYCON-0001') |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
14 |
>>> registration.save() |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
15 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
16 |
>>> save_invoice(user, registration, 'registration/invoice.html') |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
17 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
18 |
""" |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
19 |
pass |