[Zope3-Users] Writing tests for views

George Lee georgeleejr at gmail.com
Sat Sep 23 19:25:28 EDT 2006


I am trying to write a test for a view, and making sure that an object I've
created is associated with the correct view. But either of these lines fails
with a ComponentLookupError "Couldn't find view":

view = getView(self.event1, 'daterange_display', self.request)
view = getViewProviding(self.event1, IDateRangeDisplay, self.request)

even though in a page template that I view through the web,

context/@@daterange_display

retrieves the correct view. What am I doing incorrectly?

Thanks -- I know I've asked a flood of questions today!

Peace,
George



More information about the Zope3-users mailing list