def test_get_jinja_template(self): template = utils.get_jinja_template("base.html") self.assertIsInstance(template, jinja2.environment.Template) self.assertEqual("base.html", template.name) self.assertIn("include_raw_file", template.globals)
def test_get_template_jinja(self, mock_get_jinja_template): mock_get_jinja_template.return_value = "fake_template" template = utils.get_jinja_template("template.html") self.assertEqual("fake_template", template) mock_get_jinja_template.assert_called_once_with("template.html")