Test coverage report: user_media.tests.test_app.forms

# user_media.tests.test_app.forms: 13 total statements, 100.0% covered

Generated: Sat 2012-10-13 07:27 SGT

Source file: /Users/martin/Repos/django-user-media/user_media/tests/test_app/forms.py

Stats: 10 executed, 0 missed, 3 excluded, 7 ignored

1. `"""Dummy forms for the tests of the `django-user-media` application."""`
2. `from django import forms`
3. ``
4. `from user_media.forms import UserMediaImageFormMixin`
5. ``
6. `from user_media.tests.test_app.models import DummyModel`
7. ``
8. ``
9. `class DummyModelForm(UserMediaImageFormMixin, forms.ModelForm):`
10. `class Meta:`
11. `model = DummyModel`
12. `exclude = ('user', )`
13. ``
14. `def __init__(self, user, *args, **kwargs):`
15. `self.user = user`
16. `super(DummyModelForm, self).__init__(*args, **kwargs)`
17. ``
18. `def save(self, *args, **kwargs):`
19. `self.instance.user = self.user`
20. `return super(DummyModelForm, self).save(*args, **kwargs)`