def test_wrapped_markdown_with_some_markdown(self): rendered = wrapped_markdown("*italic*\n**bold**\n", css_class="a_class") self.assertEqual( '''<div class="a_class" ><p><em>italic</em> <strong>bold</strong></p></div>''', rendered, )
def test_wrapped_markdown_with_indented_lines(self): rendered = wrapped_markdown(""" # header 1st line 2nd line """) assert '<div class="rich_doc" ><h1>header</h1>\n<p>1st line\n2nd line</p></div>' == rendered
def test_wrapped_markdown_with_table(self): rendered = wrapped_markdown("""| Job | Duration | | ----------- | ----------- | | ETL | 14m |""") assert ('<div class="rich_doc" ><table>\n<thead>\n<tr>\n<th>Job</th>\n' '<th>Duration</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>ETL' '</td>\n<td>14m</td>\n</tr>\n</tbody>\n' '</table></div>') == rendered
def test_wrapped_markdown_with_table(self): rendered = wrapped_markdown( """| Job | Duration | | ----------- | ----------- | | ETL | 14m |""" ) self.assertEqual( ( '<div class="None" ><table>\n<thead>\n<tr>\n<th>Job</th>\n' '<th>Duration</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>ETL' '</td>\n<td>14m</td>\n</tr>\n</tbody>\n' '</table></div>' ), rendered, )
def test_wrapped_markdown_with_docstring_curly_braces(self): rendered = wrapped_markdown("{braces}", css_class="a_class") assert '<div class="a_class" ><p>{braces}</p></div>' == rendered
def test_wrapped_markdown_with_docstring_curly_braces(self): rendered = wrapped_markdown("{braces}", css_class="a_class") self.assertEqual( '<div class="rich_doc a_class" ><p>{braces}</p></div>', rendered)