Exemplo n.º 1
0
    def test_xml_to_dict_and_back_again(self):
        self.assertEqual(xml_to_dict(XML), DICT_AFTER)
        self.assertXmlEqual(dict_to_xml(DICT_BEFORE, 'root'), XML)

        self.assertEqual(xml_to_dict(dict_to_xml(DICT_BEFORE, 'root')),
                         DICT_AFTER)
        self.assertXmlEqual(dict_to_xml(xml_to_dict(XML), 'root'), XML)
Exemplo n.º 2
0
    def test_xml_to_dict_and_back_again(self):
        self.assertEqual(xml_to_dict(XML), DICT_AFTER)
        self.assertXmlEqual(dict_to_xml(DICT_BEFORE, 'root'), XML)

        self.assertEqual(xml_to_dict(dict_to_xml(DICT_BEFORE, 'root')), DICT_AFTER)
        self.assertXmlEqual(dict_to_xml(xml_to_dict(XML), 'root'), XML)
Exemplo n.º 3
0
def test_xml_to_dict_and_back_again():
    assert (xml_to_dict(etree.XML(xml)) == dictionary_after)
    assert (xml_to_dict(dict_to_xml(dictionary_before, 'root')) == dictionary_after)
Exemplo n.º 4
0
def test_xml_to_dict_and_back_again():
    assert (xml_to_dict(etree.XML(xml)) == dictionary_after)
    assert (xml_to_dict(dict_to_xml(dictionary_before,
                                    'root')) == dictionary_after)
 def test_xml_to_dict_and_back_again(self):
     self.assertEquals(xml_to_dict(etree.XML(xml)), dictionary_after)
     self.assertEquals(xml_to_dict(dict_to_xml(dictionary_before, 'root')), dictionary_after)