MCPcopy Create free account
hub / github.com/webpy/webpy / test_accessor

Method test_accessor

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

Source from the content-addressed store, hash-verified

56 assert repr(f()) == "'a=\"bar\" <p>\\n'"
57
58 def test_accessor(self):
59 template = 'a="$foo.id"<p>'
60 f = t(template, globals={"foo": TestItem()})
61 assert repr(f()) == "'a=\"12345\"<p>\\n'"
62
63 def test_href(self):
64 template = '<a href="/del/$item.id">Delete</a>'

Callers

nothing calls this directly

Calls 3

tFunction · 0.85
TestItemClass · 0.85
fFunction · 0.85

Tested by

no test coverage detected