Test coverage report: myapp2.views

# myapp2.views: 6 total statements, 100.0% covered

Generated: Sat 2012-06-09 22:07 SGT

Source file: /Users/martin/Projects/pycon-apac-2012/tdd-with-django/reusable-app/myapp2/views.py

Stats: 4 executed, 0 missed, 2 excluded, 15 ignored

1. `"""`
2. `Views for the ``myapp2`` application.`
3. ``
4. `Before implementing anything here, you would first create`
5. ```tests/implementation_tests/views_tests.py`` and try to call this view via`
6. ```self.client.get``. Then you would do the "TDD Dance" and gradually follow`
7. `the instructions the failing tests give you. You would add the view to the`
8. ```urls.py``, you would import the view in the ``urls.py``, you would finally`
9. `implement the view in this file and then add the missing template.`
10. ``
11. `This is a great example how TDD will guide you during your implementation`
12. ``
13. `"""`
14. `from django.views.generic import TemplateView`
15. ``
16. ``
17. `class HomeView(TemplateView):`
18. `template_name = 'myapp2/home.html'`
19. ``
20. `def dispatch(self, *args, **kwargs):`
21. `return super(HomeView, self).dispatch(*args, **kwargs)`