def test(self, xml, obj):

        # Parse raw XML to an object

        self.log('before: %s' % xml)
        p = parse_any(xml)
        self.log('after: %s' % p)

        # Assert XML parses to particular Python object

        self.assert_equal(obj, p)
Beispiel #2
0
    def _run_single(self, xml, obj):

        # Parse raw XML to an object

        p = cimxml_parse.parse_any(xml)

        # Assert XML parses to particular Python object

        self.assertEqual(obj, p,
                         '\nbefore: %s\nafter:  %s' %\
                         (xml, p))
Beispiel #3
0
    def _run_single(self, xml, obj):

        # Parse raw XML to an object

        p = cimxml_parse.parse_any(xml)

        # Assert XML parses to particular Python object

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

        # Parse raw XML to an object

        self.log('before: %s' % xml)
        p = parse_any(xml)
        self.log('after: %s' % p)

        # Assert XML parses to particular Python object

        self.assert_equal(obj, p)
    def test(self, obj):

        # Convert object to xml

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

        # Parse back to an object

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

        # Assert that the before and after objects should be equal

        self.assert_equal(obj, p)
Beispiel #6
0
    def _run_single(self, obj):

        # Convert object to xml

        xml = obj.tocimxml().toxml()

        # Parse back to an object

        p = cimxml_parse.parse_any(xml)

        # Assert that the before and after objects should be equal

        self.assertEqual(obj, p,
                         '\nbefore: %s\nafter:  %s' %\
                         (xml, p.tocimxml().toxml()))
Beispiel #7
0
    def _run_single(self, obj):

        # Convert object to xml

        xml = obj.tocimxml().toxml()

        # Parse back to an object

        p = cimxml_parse.parse_any(xml)

        # Assert that the before and after objects should be equal

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

        # Convert object to xml

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

        # Parse back to an object

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

        # Assert that the before and after objects should be equal
        
        self.assert_equal(obj, p)