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

Method test_unicode_apply

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

Source from the content-addressed store, hash-verified

103 self.assertEqual(template.generate(upper=upper), b"FOO")
104
105 def test_unicode_apply(self):
106 def upper(s):
107 return to_unicode(s).upper()
108
109 template = Template(utf8("{% apply upper %}foo \u00e9{% end %}"))
110 self.assertEqual(template.generate(upper=upper), utf8("FOO \u00c9"))
111
112 def test_bytes_apply(self):
113 def upper(s):

Callers

nothing calls this directly

Calls 3

generateMethod · 0.95
TemplateClass · 0.90
utf8Function · 0.90

Tested by

no test coverage detected