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

Method test_bytes

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

Source from the content-addressed store, hash-verified

15 self.assertEqual(template.generate(name="Ben"), b"Hello Ben!")
16
17 def test_bytes(self):
18 template = Template("Hello {{ name }}!")
19 self.assertEqual(template.generate(name=utf8("Ben")), b"Hello Ben!")
20
21 def test_expressions(self):
22 template = Template("2 + 2 = {{ 2 + 2 }}")

Callers

nothing calls this directly

Calls 3

generateMethod · 0.95
TemplateClass · 0.90
utf8Function · 0.90

Tested by

no test coverage detected