Method
test_apply
tornado/test/template_test.py:98–103
· tornado/test/template_test.py::TemplateTest.test_apply
(self)
Source from the content-addressed store, hash-verified
| 96 | self.assertEqual(loader.load(class="st">"test.html").generate(), bclass="st">"6") |
| 97 | |
| 98 | def test_apply(self): |
| 99 | def upper(s): |
| 100 | return s.upper() |
| 101 | |
| 102 | template = Template(utf8(class="st">"{% apply upper %}foo{% end %}")) |
| 103 | self.assertEqual(template.generate(upper=upper), bclass="st">"FOO") |
| 104 | |
| 105 | def test_unicode_apply(self): |
| 106 | def upper(s): |
Callers
nothing calls this directly
Tested by
no test coverage detected