parse_rst() should use `cmsreference` as the default role.
(self)
| 87 | self.assertIn("<h3>Header</h3>", output) |
| 88 | |
| 89 | def test_parse_rst(self): |
| 90 | """ |
| 91 | parse_rst() should use `cmsreference` as the default role. |
| 92 | """ |
| 93 | markup = '<p><a class="reference external" href="/admindocs/%s">title</a></p>\n' |
| 94 | self.assertEqual(parse_rst("`title`", "model"), markup % "models/title/") |
| 95 | self.assertEqual(parse_rst("`title`", "view"), markup % "views/title/") |
| 96 | self.assertEqual(parse_rst("`title`", "template"), markup % "templates/title/") |
| 97 | self.assertEqual(parse_rst("`title`", "filter"), markup % "filters/#title") |
| 98 | self.assertEqual(parse_rst("`title`", "tag"), markup % "tags/#title") |
| 99 | |
| 100 | def test_parse_rst_with_docstring_no_leading_line_feed(self): |
| 101 | title, body, _ = parse_docstring("firstline\n\n second line") |
nothing calls this directly
no test coverage detected