Ticket #10843: ticket10843.diff

File ticket10843.diff, 1.0 KB (added by Arthur Koziel, 15 years ago)
  • django/contrib/markup/tests.py

    diff -r 571ef27dfd73 django/contrib/markup/tests.py
    a b  
    2222        t = Template("{{ textile_content|textile }}")
    2323        rendered = t.render(Context(locals())).strip()
    2424        if textile:
    25             self.assertEqual(rendered, """<p>Paragraph 1</p>
     25            # textile versions prior to 2.1.0 don't add a '\t' char before
     26            # the second paragraph
     27            if(int(textile.__version__.split('.')[1]) > 0):
     28                expected_output = """<p>Paragraph 1</p>
    2629
    27 <p>Paragraph 2 with &#8220;quotes&#8221; and <code>code</code></p>""")
     30\t<p>Paragraph 2 with &#8220;quotes&#8221; and <code>code</code></p>"""
     31            else:
     32                expected_output = """<p>Paragraph 1</p>
     33
     34<p>Paragraph 2 with &#8220;quotes&#8221; and <code>code</code></p>"""
     35            self.assertEqual(rendered, expected_output)
    2836        else:
    2937            self.assertEqual(rendered, escape(textile_content))
    3038
Back to Top