class EPPluginTestCase(JinjaTestCase): def setup(self): self.tl = EPPlugin() def test_basic(self): t = self.tl.load_template('jinja2.testsuite.res.templates.test') assert t.render() == "BAR" def test_subdir(self): try: t = self.tl.load_template('jinja2.testsuite.res.templates.foo.test') except ImportError as e: assert str(e) == "No module named templates" def test_string(self): t = self.tl.load_template('foo', "hello world") assert t.render() == "hello world"
def setup(self): self.tl = EPPlugin()