示例#1
0
 def test_serializeDeferredSlots(self):
     """
     Test that a slot with a deferred as its value will be flattened using
     the value from the deferred.
     """
     t = tags.p(slot("test"))
     t.fillSlots(test=succeed(tags.em("four>")))
     return self.assertFlattensTo(t, b"<p><em>four&gt;</em></p>")
示例#2
0
文件: test_flatten.py 项目: 0004c/VTK
 def test_serializeDeferredSlots(self):
     """
     Test that a slot with a deferred as its value will be flattened using
     the value from the deferred.
     """
     t = tags.p(slot('test'))
     t.fillSlots(test=succeed(tags.em('four>')))
     return self.assertFlattensTo(t, '<p><em>four&gt;</em></p>')