예제 #1
0
 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))
예제 #2
0
 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))