MCPcopy Index your code
hub / github.com/webpy/webpy / test_href

Method test_href

tests/test_template.py:63–66  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

61 assert repr(f()) == "'a=\"12345\"<p>\\n'"
62
63 def test_href(self):
64 template = '<a href="/del/$item.id">Delete</a>'
65 f = t(template, globals={"item": TestItem()})
66 assert repr(f()) == "'<a href=\"/del/12345\">Delete</a>\\n'"
67
68 def testImportMustFail(self):
69 tpl = "${__import__('os').getpwd()}"

Callers

nothing calls this directly

Calls 3

tFunction · 0.85
TestItemClass · 0.85
fFunction · 0.85

Tested by

no test coverage detected