Make sure that a viewlet inheriting from Explicit also has the right

legacy attributes and they point to the right things.
parent a6d9d6ef
...@@ -84,7 +84,10 @@ class ExplicitViewlet(Acquisition.Explicit): ...@@ -84,7 +84,10 @@ class ExplicitViewlet(Acquisition.Explicit):
self.request = request self.request = request
def update(self): def update(self):
pass # Make sure that the viewlet has the legacy attributes and
# they point to the right objects.
assert self.aq_parent == self.context
assert self.aq_base == self
def render(self): def render(self):
return 'Viewlet inheriting from Explicit' return 'Viewlet inheriting from Explicit'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment