- # check the author page
- authorpage = self.getPage('author/%s/' % q.author.id)
- self.assertTrue(q.text in authorpage)
- self.assertTrue("author_notes" in authorpage)
+ # check the work page; each of the note type is displayed, and
+ # the work notes are shown only once
+ workpage = self.getPage('work/%s/' % q.work.id)
+ self.assertIn(q.text, workpage)
+ self.assertIn("author_notes", workpage)
+ self.assertIn("work_notes", workpage)
+ self.assertEqual(workpage.count("work_notes"), 1)
+ self.assertIn("tag_link", workpage)
+
+ # check the author page; each of the note type is displayed, and
+ # the author notes are shown only once
+ authorpage = self.getPage('author/%s/' % q.work.author.id)
+ self.assertIn(q.text, authorpage)
+ self.assertIn("author_notes", authorpage)
+ self.assertEqual(authorpage.count("author_notes"), 1)
+ self.assertIn("work_notes", authorpage)
+ self.assertIn("tag_link", authorpage)