Beispiel #1
0
 def test_template_paths(self):
     # You can specify a folder or a cfg file and that's the same thing.
     template_info1 = Template(os.path.join(TEST_DATA, 'minimal'))
     template_info2 = Template(
         os.path.join(TEST_DATA, 'minimal', 'template.cfg'))
     self.assertEqual(etree.tostring(template_info1.xml_node()),
                      etree.tostring(template_info2.xml_node()))
Beispiel #2
0
    def test_minimal_template(self):
        template_info = Template(os.path.join(TEST_DATA, 'minimal'))
        node = template_info.xml_node()

        self.assertEqual(etree.tostring(node), (
            b'<templateinfo><header/><body>'
            b'<js src="js/impress.js"/><js src="js/hovercraft-minimal.js"/>'
            b'</body></templateinfo>'))
Beispiel #3
0
 def test_minimal_template(self):
     template_info = Template(os.path.join(TEST_DATA, 'minimal'))
     node = template_info.xml_node()
     
     self.assertEqual(etree.tostring(node), (
         b'<templateinfo><header/><body>'
         b'<js src="js/impress.js"/><js src="js/hovercraft-minimal.js"/>'
         b'</body></templateinfo>'))
Beispiel #4
0
    def test_maximal_template(self):
        template_info = Template(os.path.join(TEST_DATA, 'maximal'))
        node = template_info.xml_node()

        self.assertEqual(etree.tostring(node), (
            b'<templateinfo><header>'
            b'<css href="css/style.css" media="all"/>'
            b'<css href="css/print.css" media="print"/>'
            b'<css href="css/impressConsole.css" media="screen,projection"/>'
            b'<js src="js/dummy.js"/></header>'
            b'<body><js src="js/impress.js"/><js src="js/impressConsole.js"/>'
            b'<js src="js/hovercraft.js"/>'
            b'</body></templateinfo>'))
Beispiel #5
0
    def test_maximal_template(self):
        template_info = Template(os.path.join(TEST_DATA, 'maximal'))
        node = template_info.xml_node()

        self.assertEqual(etree.tostring(node), (
            b'<templateinfo><header>'
            b'<css href="css/style.css" media="all"/>'
            b'<css href="css/print.css" media="print"/>'
            b'<css href="css/impressConsole.css" media="screen,projection"/>'
            b'<js src="js/dummy.js"/></header>'
            b'<body><js src="js/impress.js"/><js src="js/impressConsole.js"/>'
            b'<js src="js/hovercraft.js"/>'
            b'</body></templateinfo>'))
Beispiel #6
0
 def test_template_paths(self):
     # You can specify a folder or a cfg file and that's the same thing.
     template_info1 = Template(os.path.join(TEST_DATA, 'minimal'))
     template_info2 = Template(os.path.join(TEST_DATA, 'minimal', 'template.cfg'))
     self.assertEqual(etree.tostring(template_info1.xml_node()),
                      etree.tostring(template_info2.xml_node()))