MCPcopy
hub / github.com/tornadoweb/tornado / test_bytes_apply

Method test_bytes_apply

tornado/test/template_test.py:112–117  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

110 self.assertEqual(template.generate(upper=upper), utf8("FOO \u00c9"))
111
112 def test_bytes_apply(self):
113 def upper(s):
114 return utf8(to_unicode(s).upper())
115
116 template = Template(utf8("{% apply upper %}foo \u00e9{% end %}"))
117 self.assertEqual(template.generate(upper=upper), utf8("FOO \u00c9"))
118
119 def test_if(self):
120 template = Template(utf8("{% if x > 4 %}yes{% else %}no{% end %}"))

Callers

nothing calls this directly

Calls 3

generateMethod · 0.95
TemplateClass · 0.90
utf8Function · 0.90

Tested by

no test coverage detected