def test_to_xml_file(self): d = IODict({ 'root': { 'x': '7', 'y': '8', 'z': '9', 'a': '1', 'b': '2', 'c': '3', }, }) filepath = self.output_path('test_to_xml_file.xml') d.to_xml(filepath=filepath) self.assertFileExists(filepath) self.assertEqual(d, IODict.from_xml(filepath))
def test_to_xml(self): d = IODict({ 'root': { 'x': '7', 'y': '8', 'z': '9', 'a': '1', 'b': '2', 'c': '3', }, }) s = d.to_xml() self.assertEqual(d, IODict.from_xml(s))