Esempio n. 1
0
 def test_render_template_error(self):
     process_mock = MagicMock(requirements={'expression-engine': 'jinja'})
     with self.assertRaises(EvaluationError):
         render_template(process_mock, '{{ 1 | missing_increase }}', {})
Esempio n. 2
0
 def test_render_template(self):
     process_mock = MagicMock(requirements={'expression-engine': 'jinja'})
     template = render_template(process_mock, '{{ 1 | increase }}', {})
     self.assertEqual(template, '2')