MCPcopy Create free account
hub / github.com/EasyIME/PIME / test_extends

Method test_extends

python/python3/tornado/test/template_test.py:40–57  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

38 )
39
40 def test_extends(self):
41 loader = DictLoader(
42 {
43 "base.html": """\
44<title>{% block title %}default title{% end %}</title>
45<body>{% block body %}default body{% end %}</body>
46""",
47 "page.html": """\
48{% extends "base.html" %}
49{% block title %}page title{% end %}
50{% block body %}page body{% end %}
51""",
52 }
53 )
54 self.assertEqual(
55 loader.load("page.html").generate(),
56 b"<title>page title</title>\n<body>page body</body>\n",
57 )
58
59 def test_relative_load(self):
60 loader = DictLoader(

Callers

nothing calls this directly

Calls 3

DictLoaderClass · 0.90
generateMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected