def test_render_to(self): context = { 'username': '******', 'balance': 10.01 } html_fd = render_to('html', 'sample.odt', context) html_data = html_fd.read() html_fd.close() self.assertTrue('John Doe' in html_data)
def test_render_to(self): context = {"username": "******", "balance": 10.01} html_fd = render_to("html", "sample.odt", context) html_data = html_fd.read() html_fd.close() self.assertTrue("John Doe" in html_data)
def renderDocPdf(odtfile, format): docfile = render_to(format, odtfile) return os.path.abspath(docfile.name)