예제 #1
0
    def _run_single(self, xml, obj):

        # Parse raw XML to an object

        result = tupleparse.parse_any(tupletree.xml_to_tupletree(xml))

        # Assert XML parses to particular Python object

        self.assertEqual(obj, result, 'parsed XML: %s' % result)
    def test(self, xml, obj):

        # Parse raw XML to an object

        result = parse_any(xml_to_tupletree(xml))
        self.log('parsed XML: %s' % result)

        # Assert XML parses to particular Python object

        self.assert_equal(obj, result)
    def test(self, xml, obj):

        # Parse raw XML to an object

        result = parse_any(xml_to_tupletree(xml))
        self.log('parsed XML: %s' % result)

        # Assert XML parses to particular Python object

        self.assert_equal(obj, result)
예제 #4
0
    def _run_single(self, xml, obj):

        # Parse raw XML to an object

        result = tupleparse.parse_any(tupletree.xml_to_tupletree(xml))

        # Assert XML parses to particular Python object

        self.assertEqual(obj, result,
                         'parsed XML: %s' % result)
예제 #5
0
    def _run_single(self, obj):

        # Convert object to xml

        xml = obj.tocimxml().toxml()

        # Parse back to an object

        result = tupleparse.parse_any(tupletree.xml_to_tupletree(xml))

        # Assert that the before and after objects should be equal

        self.assertEqual(obj, result,
                         '\nbefore: %s\nafter:  %s' %\
                         (xml, result.tocimxml().toxml()))
    def test(self, obj):

        # Convert object to xml

        xml = obj.tocimxml().toxml()
        self.log('before: %s' % xml)

        # Parse back to an object

        result = parse_any(xml_to_tupletree(xml))
        self.log('after:  %s' % result.tocimxml().toxml())

        # Assert that the before and after objects should be equal
        
        self.assert_equal(obj, result)
    def test(self, obj):

        # Convert object to xml

        xml = obj.tocimxml().toxml()
        self.log('before: %s' % xml)

        # Parse back to an object

        result = parse_any(xml_to_tupletree(xml))
        self.log('after:  %s' % result.tocimxml().toxml())

        # Assert that the before and after objects should be equal

        self.assert_equal(obj, result)
예제 #8
0
    def _run_single(self, obj):

        # Convert object to xml

        xml = obj.tocimxml().toxml()

        # Parse back to an object

        result = tupleparse.parse_any(tupletree.xml_to_tupletree(xml))

        # Assert that the before and after objects should be equal

        self.assertEqual(obj, result,
                         '\nbefore: %s\nafter:  %s' %\
                         (xml, result.tocimxml().toxml()))