Example #1
0
class MakoTemplateLoaderTest(unittest.TestCase):
    def setUp(self):
        path = os.path.join(os.path.dirname(__file__), "templates")
        self.loader = MakoTemplateLoader(path)

    def test_mako_syntax_in_utf8_file(self):
        tmpl = self.loader.load("utf8.html")
        result = tmpl.generate(name='my friend')
        self.assertEqual(to_unicode(result).strip(), u"H\u00e9llo my friend")
Example #2
0
 def setUp(self):
     path = os.path.join(os.path.dirname(__file__), "templates")
     self.loader = MakoTemplateLoader(path)