<p>All the quotes for {{ author.name }}:<p>
{% for quote in author.quote_set.all %}
- {% include "quotes/display.html" with quote=quote %}
+ {% include "quotes/display.html" with quote=quote skip_author_notes=True %}
{% endfor %}
-
{% endblock %}
self.assertEqual(response.status_code, 200)
self.assertFalse('Quote01, two tags' in response.content)
self.assertTrue('Quote02' in response.content)
+
+ def test_view_author_notes_once(self):
+ # check that on the per-author view, the author notes aren't display
+ # for every quote
+ a = Author.objects.filter(name="Author with notes")
+ self.assertEqual(a.count(), 1)
+ a = a[0]
+
+ c = Client()
+ response = c.get('/quotes/author/%s/' % a.id)
+ self.assertEqual(response.status_code, 200)
+ self.assertEqual(response.content.count("Some notes"), 1)