示例#1
0
 def test_processor(self):
     t = cubictemp._Block("dummyproc", 0, self.s, {})
     t.append(cubictemp._Text("foo"))
     assert t.render(dummyproc=dummyproc) == "::foo::"
示例#2
0
 def test_render(self):
     t = cubictemp._Block(None, 0, self.s, {})
     t.append(cubictemp._Text("bar"))
     assert t.render() == "bar"
示例#3
0
 def test_block(self):
     e = cubictemp._Expression("foo", "@", 0, self.s, {})
     t = cubictemp._Block(None, 0, self.s, {})
     t.append(cubictemp._Text("bar"))
     assert e.render(foo=t) == "bar"
示例#4
0
 def test_processor(self):
     t = cubictemp._Block("dummyproc", 0, self.s, {})
     t.append(cubictemp._Text("foo"))
     assert t.render(dummyproc=dummyproc) == "::foo::"
示例#5
0
 def test_render(self):
     t = cubictemp._Block(None, 0, self.s, {})
     t.append(cubictemp._Text("bar"))
     assert t.render() == "bar"
示例#6
0
 def test_block(self):
     e = cubictemp._Expression("foo", "@", 0, self.s, {})
     t = cubictemp._Block(None, 0, self.s, {})
     t.append(cubictemp._Text("bar"))
     assert e.render(foo=t) == "bar"