comparison test/test_cgi.py @ 5519:14a61eabcea8

Fixed unicode issues for XML template with Python 2
author Christof Meerwald <cmeerw@cmeerw.org>
date Sat, 25 Aug 2018 15:20:38 +0100
parents cd0ceb2afdb8
children be99aa02c616
comparison
equal deleted inserted replaced
5518:db3a95f28b3c 5519:14a61eabcea8
805 <p><input name="superseder" size="30" type="text" value="5000"></p> 805 <p><input name="superseder" size="30" type="text" value="5000"></p>
806 </body> 806 </body>
807 </html> 807 </html>
808 """.strip ()) 808 """.strip ())
809 809
810 def testXMLTemplate(self):
811 page_template = """<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal"></feed>"""
812 pt = RoundupPageTemplate()
813 pt.pt_edit(page_template, 'application/xml')
814
815 cl = self.setupClient({ }, 'issue',
816 env_addon = {'HTTP_REFERER': 'http://whoami.com/path/'})
817 out = pt.render(cl, 'issue', MockNull())
818 self.assertEquals(out, '<?xml version="1.0" encoding="UTF-8"?><feed\n xmlns="http://www.w3.org/2005/Atom"/>\n')
819
810 def testCsrfProtection(self): 820 def testCsrfProtection(self):
811 # need to set SENDMAILDEBUG to prevent 821 # need to set SENDMAILDEBUG to prevent
812 # downstream issue when email is sent on successful 822 # downstream issue when email is sent on successful
813 # issue creation. Also delete the file afterwards 823 # issue creation. Also delete the file afterwards
814 # just tomake sure that someother test looking for 824 # just tomake sure that someother test looking for

Roundup Issue Tracker: http://roundup-tracker.org/