예제 #1
0
    def afterSetUp(self):

        # make some test content
        mstool = getToolByName(self.portal, 'portal_membership')
        self.loginAsPortalOwner()
        mstool.getAuthenticatedMember() # wrap user
        self.proj = makeContent(self.folder, 'project1', 'OpenProject')
예제 #2
0
 def afterSetUp(self):
     OpenPlansTestCase.afterSetUp(self)
     self.folder.manage_permission('OpenPlans: Add OpenProject',
                                   roles=('Manager', 'Owner'))
     self.proj = makeContent(self.folder, 'project1', 'OpenProject')
     setSite(self.portal)
     setHooks()
예제 #3
0
    def test_addFeaturelet(self):
        featurelet = ListenFeaturelet(self.project)
        team = makeContent(self.portal.portal_teams, 'Team', 'OpenTeam')
        self.project.setSpaceTeams([team])
        self.assertEqual(list(self.project.objectIds()), [])
        request = self.project.REQUEST
        try:
            view = getMultiAdapter((self.project, request),
                                   Interface, ListenFeaturelet.config_view)
        except ComponentLookupError:
            pass
        else:
            self.fail("Config view shouldn't be available until the "
                      "featurelet is installed.")
        fletsupporter = IFeatureletSupporter(self.project)
        fletsupporter.installFeaturelet(featurelet)

        list_folder_id = featurelet._info['content'][0]['id']
        self.failUnless(list_folder_id in self.project.objectIds())
예제 #4
0
 def afterSetUp(self):
     OpenPlansTestCase.afterSetUp(self)
     self.loginAsPortalOwner()
     self.project = makeContent(self.portal, 'project', 'OpenProject')
     setSite(self.portal)
     setHooks()