Ticket #5362: 5362_fix.diff

File 5362_fix.diff, 992 bytes (added by Keith Bussell, 17 years ago)

Patch for the test

  • django/contrib/markup/tests.py

     
    6161        t = Template("{{ rest_content|restructuredtext }}")
    6262        rendered = t.render(Context(locals())).strip()
    6363        if docutils:
    64             self.assertEqual(rendered, """<p>Paragraph 1</p>
     64            try:
     65                # docutils v0.4 and earlier
     66                self.assertEqual(rendered, """<p>Paragraph 1</p>
    6567<p>Paragraph 2 with a <a class="reference" href="http://www.example.com/">link</a></p>""")
     68            except AssertionError, e:
     69                # newer versions of docutils (latest source)
     70                self.assertEqual(rendered, """<p>Paragraph 1</p>
     71<p>Paragraph 2 with a <a class="reference external" href="http://www.example.com/">link</a></p>""")
    6672        else:
    6773            self.assertEqual(rendered, rest_content)
    6874
Back to Top