示例#1
0
    def test_pretty_print(self):
        """Test pretty-printing"""

        xml = render_template(get_abspath('../sample.yml'), 'iso19139')
        xml2 = pretty_print(xml)

        self.assertIsInstance(xml2, text_type, 'Expected unicode string')
        self.assertEqual(xml2[-1], '>', 'Expected closing bracket')
        self.assertTrue(xml2.startswith('<?xml'), 'Expected XML declaration')
示例#2
0
    def test_pretty_print(self):
        """Test pretty-printing"""

        xml = render_template(get_abspath('../sample.yml'), 'iso19139')
        xml2 = pretty_print(xml)

        self.assertIsInstance(xml2, text_type, 'Expected unicode string')
        self.assertEqual(xml2[-1], '>', 'Expected closing bracket')
        self.assertTrue(xml2.startswith('<?xml'), 'Expected XML declaration')
示例#3
0
    def test_pretty_print(self):
        """Test pretty-printing"""

        iso_os = ISO19139OutputSchema()

        xml = render_j2_template(read_mcf(get_abspath('../sample.yml')),
                                 iso_os.template_dir)
        xml2 = pretty_print(xml)

        self.assertIsInstance(xml2, str, 'Expected unicode string')
        self.assertEqual(xml2[-1], '>', 'Expected closing bracket')
        self.assertTrue(xml2.startswith('<?xml'), 'Expected XML declaration')