def test_find_event_listing(self): self.portal.subfolder2.setLayout("event_listing") self.assertEqual(find_event_listing(self.portal.subfolder2.subfolder3), self.portal.subfolder2) self.assertEqual( find_event_listing(self.portal.subfolder2.subfolder3, as_url=True), "http://nohost/plone/subfolder2" ) self.assertEqual( find_context(self.portal.subfolder2.subfolder3, viewname="foo", as_url=True, append_view=True), "http://nohost/plone/foo", )
def test_find_event_listing(self): self.portal.subfolder2.setLayout('event_listing') self.assertEqual(find_event_listing(self.portal.subfolder2.subfolder3), self.portal.subfolder2) self.assertEqual( find_event_listing(self.portal.subfolder2.subfolder3, as_url=True), 'http://nohost/plone/subfolder2') self.assertEqual( find_context(self.portal.subfolder2.subfolder3, viewname='foo', as_url=True, append_view=True), 'http://nohost/plone/foo')