コード例 #1
0
    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",
        )
コード例 #2
0
    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')