def testSolution_Complete(self): solution = Solution() solution.description = "<p>Tést description</p>" solution.action = "Sample actiøn plan" solution.requirements = "Requîrements" root = self.root() view = ExportSurvey(None, None) node = view.exportSolution(root, solution) self.assertEqual( safe_nativestring(etree.tostring(node, pretty_print=True)), '<solution xmlns="http://xml.simplon.biz/euphorie/survey/1.0">\n' " <description><p>Tést description</p>" "</description>\n" " <action>Sample actiøn plan</action>\n" " <requirements>Requîrements</requirements>\n" "</solution>\n", )
def testSolution_Minimal(self): solution = Solution() solution.description = "<p>Test description</p>" solution.action = "Sample action plan" solution.requirements = None root = self.root() view = ExportSurvey(None, None) node = view.exportSolution(root, solution) self.assertTrue(node in root) self.assertEqual( safe_nativestring(etree.tostring(node, pretty_print=True)), '<solution xmlns="http://xml.simplon.biz/euphorie/survey/1.0">\n' " <description><p>Test description</p>" "</description>\n" " <action>Sample action plan</action>\n" "</solution>\n", )