Exemple #1
0
 def test_to_html_unknown_format(self):
     filename = 'blah'
     content = 'This is just a random file'
     config = {'format': 'pdf'}
     page = Page(filename=filename, config=config, content=content)
     should_be = 'This is just a random file'
     with pytest.raises(NoRenderEngineError):
         page.to_html()
 def test_to_html_unknown_format(self):
     filename = 'blah'
     content = 'This is just a random file'
     config = {'format': 'pdf'}
     page = Page(filename=filename, config=config, content=content)
     should_be = 'This is just a random file'
     with pytest.raises(NoRenderEngineError):
         page.to_html()
Exemple #3
0
 def test_to_html_html_format(self):
     filename = 'blah'
     content = 'This is just a random file'
     config = {'format': 'html'}
     page = Page(filename=filename, config=config, content=content)
     should_be = 'This is just a random file'
     assert page.to_html() == should_be
 def test_to_html_html_format(self):
     filename = 'blah'
     content = 'This is just a random file'
     config = {'format': 'html'}
     page = Page(filename=filename, config=config, content=content)
     should_be = 'This is just a random file'
     assert page.to_html() == should_be
Exemple #5
0
 def test_to_html_no_markup_specified(self):
     filename = 'blah'
     content = 'This is just a random file'
     page = Page(filename=filename, content=content)
     should_be = '<p>This is just a random file</p>'
     assert page.to_html() == should_be
 def test_to_html_no_markup_specified(self):
     filename = 'blah'
     content = 'This is just a random file'
     page = Page(filename=filename, content=content)
     should_be = '<p>This is just a random file</p>'
     assert page.to_html() == should_be