Test coverage report: miniblog.blogs.views

# miniblog.blogs.views: 25 total statements, 93.8% covered

Generated: Thu 2012-03-01 08:22 CST

Source file: /home/alisue/Dropbox/Codes/django-permission/tests/src/miniblog/blogs/views.py

Stats: 15 executed, 1 missed, 9 excluded, 38 ignored

1. `# vim: set fileencoding=utf-8 :`
2. `"""`
3. `Mini blog views`
4. ``
5. ``
6. `AUTHOR:`
7. `lambdalisue[Ali su ae] (lambdalisue@hashnote.net)`
8. ``
9. `License:`
10. `The MIT License (MIT)`
11. ``
12. `Copyright (c) 2012 Alisue allright reserved.`
13. ``
14. `Permission is hereby granted, free of charge, to any person obtaining a copy`
15. `of this software and associated documentation files (the "Software"), to`
16. `deal in the Software without restriction, including without limitation the`
17. `rights to use, copy, modify, merge, publish, distribute, sublicense, and/or`
18. `sell copies of the Software, and to permit persons to whom the Software is`
19. `furnished to do so, subject to the following conditions:`
20. ``
21. `The above copyright notice and this permission notice shall be included in`
22. `all copies or substantial portions of the Software.`
23. ``
24. `THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR`
25. `IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,`
26. `FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE`
27. `AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER`
28. `LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING`
29. `FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS`
30. `IN THE SOFTWARE.`
31. ``
32. `"""`
33. `from __future__ import with_statement`
34. `from django.views.generic import ListView`
35. `from django.views.generic import DetailView`
36. `from django.views.generic import CreateView`
37. `from django.views.generic import UpdateView`
38. `from django.views.generic import DeleteView`
39. `from django.core.urlresolvers import reverse`
40. ``
41. `from models import Entry`
42. `from forms import EntryForm`
43. ``
44. `class EntryListView(ListView):`
45. `model = Entry`
46. ``
47. `class EntryDetailView(DetailView):`
48. `model = Entry`
49. `slug_field = 'title'`
50. ``
51. `class EntryCreateView(CreateView):`
52. `form_class = EntryForm`
53. `model = Entry`
54. ``
55. `class EntryUpdateView(UpdateView):`
56. `form_class = EntryForm`
57. `model = Entry`
58. ``
59. `class EntryDeleteView(DeleteView):`
60. `model = Entry`
61. `def get_success_url(self):`
62. `return reverse('blogs-entry-list')`
63. ``