Пример #1
0
    def test_template_with_controller_and_not_existent_template(self):

        dummy = self.dummy
        template = Template(controller=dummy)
        self.assertEqual(
            template.render('dummy_test.html',
                            title='Dummy Test',
                            content='Dummy'), u'<!DOCTYPE html>\n'
            '<html lang="en">\n'
            '<head>\n'
            '    <title>Dummy Test Controller</title>\n'
            '</head>\n'
            '<body>\n'
            '    Dummy\n'
            '</body>\n'
            '</html>')
Пример #2
0
 def dummy_test(self):
     return Template(controller=self).render(title='Dummy Test',
                                             content='Dummy')
Пример #3
0
    def setUp(self):
        self.currdir = os.getcwd()
        os.chdir('../mamba/test/dummy_app')

        self.dummy = DummyController()
        self.template = Template(size=0)
Пример #4
0
 def dummy_test2(self):
     return Template(controller=self,
                     size=0).render(template='dummy_test2.html')