Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
CMFPlone.tests.testPortalCreation.TestPortalCreation Class Reference
Inheritance diagram for CMFPlone.tests.testPortalCreation.TestPortalCreation:
Inheritance graph
[legend]
Collaboration diagram for CMFPlone.tests.testPortalCreation.TestPortalCreation:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def beforeTearDown
def testInstanceVersion
def testPloneSkins
def testDefaultSkin
def testNoIndexHtmlDocument
def testCanViewManagementScreen
def testControlPanelGroups
def testWorkflowIsActionProvider
def testLargePloneFolderWorkflow
def testMembersFolderMetaType
def testMembersFolderPortalType
def testMembersFolderMeta
def testMembersFolderIsIndexed
def testSecureMailHost
def testUseFolderContentsProperty
def testFolderEditActionHasEditTitle
def testFolderHasFolderListingAction
def testImagePatch
def testNoPortalFormTool
def testNoPortalNavigationTool
def testNoFormProperties
def testNoNavigationProperties
def testFullScreenAction
def testFullScreenActionIcon
def testVisibleIdsProperties
def testFormToolTipsProperty
def testNavTreeProperties
def testSitemapAction
def testResourceRegistries
def testUnfriendlyTypesProperty
def testNonDefaultPageTypes
def testNoMembersAction
def testNoNewsAction
def testNewsTopicIsIndexed
def testEventsTopicIsIndexed
def testNewsFolderIsIndexed
def testEventsFolderIsIndexed
def testNewsFolder
def testEventsFolder
def testNewsTopic
def testEventsTopic
def testEventsSubTopic
def testObjectButtonActions
def testContentsTabVisible
def testDefaultGroupsAdded
def testDefaultTypesInPortalFactory
def testAllDependenciesMet
def testDisableFolderSectionsSiteProperty
def testSelectableViewsOnFolder
def testSelectableViewsOnTopic
def testLocationMemberdataProperty
def testLanguageMemberdataProperty
def testDescriptionMemberdataProperty
def testHome_PageMemberdataProperty
def testExtEditorMemberdataProperty
def testChangeStateIsLastFolderButton
def testTypesUseViewActionInListingsProperty
def testSiteSetupAction
def testFolderlistingAction
def testEnableLivesearchProperty
def testSearchSettingsActionIcon
def testPortalFTIIsDynamicFTI
def testPloneSiteFTIHasMethodAliases
def testSiteActions
def testNoMembershipToolPloneSetupAction
def testTypesHaveSelectedLayoutViewAction
def testPortalUsesMethodAliases
def testNavigationSettingsActionIcon
def testNavigationAndSearchPanelsInstalled
def testOwnerHasAccessInactivePermission
def testSyndicationEnabledByDefault
def testSyndicationEnabledOnNewsAndEvents
def testSyndicationTabDisabled
def testObjectButtonActionsInvisibleOnPortalRoot
def testObjectButtonActionsInvisibleOnPortalDefaultDocument
def testObjectButtonActionsOnDefaultDocumentApplyToParent
def testObjectButtonActionsPerformCorrectAction
def testObjectButtonActionsInExpectedOrder
def testPlone3rdPartyLayerInDefault
def testPloneLoginLayerInDefault
def testCMFLegacySkinComesLastInDefault
def testCustomSkinFolderExists
def testCustomSkinFolderComesFirst
def testMemberHasViewGroupsPermission
def testDiscussionItemHasNoWorkflow
def testFolderHasFolderListingView
def testFolderHasSummaryView
def testFolderHasTabularView
def testFolderHasAlbumView
def testConfigurableSafeHtmlTransform
def testNavtreePropertiesNormalized
def testvcXMLRPCRemoved
def testActionDropDownMenuIcons
def testCacheManagers
def testHomeActionUsesView
def testPloneLexicon
def testMakeSnapshot
def testValidateEmail
def testSiteManagerSetup
def testUtilityRegistration
def testPortletManagersInstalled
def testPortletAssignmentsAtRoot
def testPortletBlockingForMembersFolder
def testAddablePortletsInColumns
def testAddablePortletsInDashboard
def testReaderEditorRoles
def testWorkflowsInstalled
def testAddPermisssionsGivenToContributorRole
def testSharingAction
def testSecondaryEditorPermissionsGivenToEditorRole
def testNonFolderishTabsProperty
def testPortalContentLanguage
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 membership
 workflow
 types
 cp
 actions
 icons
 properties
 memberdata
 catalog
 groups
 factory
 skins
 transforms
 javascripts
 setup

Detailed Description

Definition at line 43 of file testPortalCreation.py.


Member Function Documentation

Definition at line 45 of file testPortalCreation.py.

00045 
00046     def afterSetUp(self):
00047         self.membership = self.portal.portal_membership
00048         self.workflow = self.portal.portal_workflow
00049         self.types = self.portal.portal_types
00050         self.cp = self.portal.portal_controlpanel
00051         self.actions = self.portal.portal_actions
00052         self.icons = self.portal.portal_actionicons
00053         self.properties = self.portal.portal_properties
00054         self.memberdata = self.portal.portal_memberdata
00055         self.catalog = self.portal.portal_catalog
00056         self.groups = self.portal.portal_groups
00057         self.factory = self.portal.portal_factory
00058         self.skins = self.portal.portal_skins
00059         self.transforms = self.portal.portal_transforms
00060         self.javascripts = self.portal.portal_javascripts
00061         self.setup = self.portal.portal_setup

Definition at line 62 of file testPortalCreation.py.

00062 
00063     def beforeTearDown(self):
00064         self._free_warning_output()

Here is the call graph for this function:

Definition at line 30 of file PloneTestCase.py.

00030 
00031     def getAuthenticator(self):
00032         tag = AuthenticatorView('context', 'request').authenticator()
00033         pattern = '<input .*name="(\w+)".*value="(\w+)"'
00034         return match(pattern, tag).groups()

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFPlone.tests.PloneTestCase.PloneTestCase.setRequestMethod (   self,
  method 
) [inherited]
This is a stub now, but in case you want to try
   something fancy on Your Branch (tm), put it here.

Definition at line 26 of file PloneTestCase.py.

00026 
00027     def setRequestMethod(self, method):
00028         self.app.REQUEST.set('REQUEST_METHOD', method)
00029         self.app.REQUEST.method = method

Here is the caller graph for this function:

Definition at line 35 of file PloneTestCase.py.

00035 
00036     def setupAuthenticator(self):
00037         name, token = self.getAuthenticator()
00038         self.app.REQUEST.form[name] = token
00039 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 672 of file testPortalCreation.py.

00672 
00673     def testActionDropDownMenuIcons(self):
00674         # Object buttons should have icons
00675         icons = self.icons.listActionIcons()
00676         def assertIcon(action_id):
00677             for icon in icons:
00678                 if (icon.getActionId() == action_id and
00679                     icon.getCategory() == 'object_buttons'):
00680                     break
00681             else:
00682                 self.fail("Action icons tool has no '%s' icon" % action_id)
00683         assertIcon('cut')
00684         assertIcon('copy')
00685         assertIcon('paste')
00686         assertIcon('delete')

Here is the call graph for this function:

Definition at line 792 of file testPortalCreation.py.

00792 
00793     def testAddablePortletsInColumns(self):
00794         for name in (u'plone.leftcolumn', u'plone.rightcolumn'):
00795             column = getUtility(IPortletManager, name=name)
00796             addable_types = [
00797               p.addview for p in column.getAddablePortletTypes()
00798               ]
00799             addable_types.sort()
00800             self.assertEqual([
00801                 'plone.portlet.collection.Collection',
00802                 'plone.portlet.static.Static',
00803                 'portlets.Calendar',
00804                 'portlets.Classic',
00805                 'portlets.Events',
00806                 'portlets.Login',
00807                 'portlets.Navigation',
00808                 'portlets.News',
00809                 'portlets.Recent',
00810                 'portlets.Review',
00811                 'portlets.Search',
00812                 'portlets.rss'], addable_types)

Definition at line 813 of file testPortalCreation.py.

00813 
00814     def testAddablePortletsInDashboard(self):
00815         for name in ('plone.dashboard1', 'plone.dashboard2',
00816           'plone.dashboard3', 'plone.dashboard4'):
00817             column = getUtility(IPortletManager, name=name)
00818             addable_types = [
00819               p.addview for p in column.getAddablePortletTypes()
00820               ]
00821             addable_types.sort()
00822             self.assertEqual([
00823               'plone.portlet.collection.Collection',
00824               'plone.portlet.static.Static',
00825               'portlets.Calendar',
00826               'portlets.Classic',
00827               'portlets.Events',
00828               'portlets.News',
00829               'portlets.Recent',
00830               'portlets.Review',
00831               'portlets.Search',
00832               'portlets.rss'
00833               ], addable_types)

Definition at line 847 of file testPortalCreation.py.

00847 
00848     def testAddPermisssionsGivenToContributorRole(self):
00849         self.failUnless('Contributor' in self.portal.valid_roles())
00850         self.failUnless('Contributor' in self.portal.acl_users.portal_role_manager.listRoleIds())
00851         for p in ['Add portal content', 'Add portal folders', 'ATContentTypes: Add Document',
00852                     'ATContentTypes: Add Event', 'ATContentTypes: Add Favorite',
00853                     'ATContentTypes: Add File', 'ATContentTypes: Add Folder',
00854                     'ATContentTypes: Add Image', 'ATContentTypes: Add Large Plone Folder',
00855                     'ATContentTypes: Add Link', 'ATContentTypes: Add News Item', ]:
00856             self.failUnless(p in [r['name'] for r in
00857                                 self.portal.permissionsOfRole('Contributor') if r['selected']])

Definition at line 363 of file testPortalCreation.py.

00363 
00364     def testAllDependenciesMet(self):
00365         from Products.CMFPlone.setup import dependencies
00366         # filter out the unknown Zope version message
00367         msgs = [x for x in dependencies.messages if
00368                   not x['message'].startswith('Unable to detect Zope version.')]
00369         msgs = [x for x in msgs if not x['optional']]
00370         self.failUnlessEqual(msgs, [])

Definition at line 687 of file testPortalCreation.py.

00687 
00688     def testCacheManagers(self):
00689         # The cache and caching policy managers should exist
00690         httpcache = self.portal._getOb('HTTPCache', None)
00691         ramcache = self.portal._getOb('RAMCache', None)
00692         cpm = self.portal._getOb('caching_policy_manager', None)
00693         self.failUnless(isinstance(httpcache, AcceleratedHTTPCacheManager))
00694         self.failUnless(isinstance(ramcache, RAMCacheManager))
00695         self.failUnless(isinstance(cpm, CachingPolicyManager))

Definition at line 82 of file testPortalCreation.py.

00082 
00083     def testCanViewManagementScreen(self):
00084         # Make sure the ZMI management screen works
00085         self.portal.manage_main()

Definition at line 408 of file testPortalCreation.py.

00408 
00409     def testChangeStateIsLastFolderButton(self):
00410         # Change state button should be the last
00411         actions = self.actions._getOb('folder_buttons').objectIds()
00412         self.assertEqual(actions[-1], 'change_state')

Here is the call graph for this function:

Definition at line 603 of file testPortalCreation.py.

00603 
00604     def testCMFLegacySkinComesLastInDefault(self):
00605         # cmf_legacy should be the last skin layer
00606         path = self.skins.getSkinPath('Plone Default')
00607         path = [x.strip() for x in path.split(',')]
00608         self.assertEqual(path[-1], 'cmf_legacy')

Definition at line 647 of file testPortalCreation.py.

00647 
00648     def testConfigurableSafeHtmlTransform(self):
00649         # The safe_html transformation should be configurable
00650         try:
00651             self.transforms.safe_html.get_parameter_value('disable_transform')
00652         except (AttributeError, KeyError):
00653             self.fail('safe_html transformation not updated')

Here is the call graph for this function:

Definition at line 346 of file testPortalCreation.py.

00346 
00347     def testContentsTabVisible(self):
00348         for a in self.actions.listActions():
00349             if a.getId() == 'folderContents':
00350                 self.failUnless(a.visible)

Definition at line 86 of file testPortalCreation.py.

00086 
00087     def testControlPanelGroups(self):
00088         # Test for http://dev.plone.org/plone/ticket/2749
00089         # Wake up object, in the case it was deactivated.
00090         dir(self.cp); dir(self.cp)
00091         self.failUnless(self.cp.__dict__.has_key('groups'))

Definition at line 613 of file testPortalCreation.py.

00613 
00614     def testCustomSkinFolderComesFirst(self):
00615         firstInDefaultSkin = (
00616             self.skins.getSkinPath('Plone Default').split(',')[0])
00617         self.assertEqual(
00618             firstInDefaultSkin, 'custom',
00619             "The 'custom' layer was not the first in the Plone Default skin. "
00620             "It was %r." % firstInDefaultSkin)

Here is the call graph for this function:

Definition at line 609 of file testPortalCreation.py.

00609 
00610     def testCustomSkinFolderExists(self):
00611         # the custom skin needs to be created
00612         self.failUnless('custom' in self.skins.objectIds())

Definition at line 351 of file testPortalCreation.py.

00351 
00352     def testDefaultGroupsAdded(self):
00353         self._trap_warning_output()
00354         self.failUnless('Administrators' in self.groups.listGroupIds())
00355         self.failUnless('Reviewers' in self.groups.listGroupIds())

Here is the call graph for this function:

Definition at line 74 of file testPortalCreation.py.

00074 
00075     def testDefaultSkin(self):
00076         # index_html should render
00077         self.portal.index_html()

Definition at line 356 of file testPortalCreation.py.

00356 
00357     def testDefaultTypesInPortalFactory(self):
00358         types = self.factory.getFactoryTypes().keys()
00359         for metaType in ('Document', 'Event', 'File', 'Folder', 'Image',
00360                          'Folder', 'Large Plone Folder', 'Link', 'News Item',
00361                          'Topic'):
00362             self.failUnless(metaType in types)

Definition at line 396 of file testPortalCreation.py.

00396 
00397     def testDescriptionMemberdataProperty(self):
00398         # portal_memberdata should have a description property
00399         self.failUnless(self.memberdata.hasProperty('description'))

Definition at line 371 of file testPortalCreation.py.

00371 
00372     def testDisableFolderSectionsSiteProperty(self):
00373         # The disable_folder_sections site property should be emtpy
00374         props = self.portal.portal_properties.site_properties
00375         self.failUnless(props.getProperty('disable_folder_sections', None) is not None)
00376         self.failIf(props.getProperty('disable_folder_sections'))

Definition at line 628 of file testPortalCreation.py.

00628 
00629     def testDiscussionItemHasNoWorkflow(self):
00630         self.assertEqual(self.workflow.getChainForPortalType('Discussion Item'), ())

Definition at line 434 of file testPortalCreation.py.

00434 
00435     def testEnableLivesearchProperty(self):
00436         # site_properties should have enable_livesearch property
00437         self.failUnless(self.properties.site_properties.hasProperty('enable_livesearch'))

Definition at line 291 of file testPortalCreation.py.

00291 
00292     def testEventsFolder(self):
00293         self.failUnless('events' in self.portal.objectIds())
00294         folder = getattr(self.portal, 'events')
00295         self.assertEqual(folder.portal_type, 'Large Plone Folder')
00296         self.assertEqual(folder.getDefaultPage(), 'aggregator')
00297         self.assertEqual(folder.getRawLocallyAllowedTypes(), ('Event',))
00298         self.assertEqual(folder.getRawImmediatelyAddableTypes(), ('Event',))
00299         self.assertEqual(folder.checkCreationFlag(), False)

Here is the call graph for this function:

Definition at line 274 of file testPortalCreation.py.

00274 
00275     def testEventsFolderIsIndexed(self):
00276         # Events folder should be cataloged
00277         res = self.catalog(path={'query' : '/plone/events', 'depth' : 0})
00278         self.assertEqual(len(res), 1)
00279         self.assertEqual(res[0].getId, 'events')
00280         self.assertEqual(res[0].Title, 'Events')
00281         self.assertEqual(res[0].Description, 'Site Events')

Definition at line 324 of file testPortalCreation.py.

00324 
00325     def testEventsSubTopic(self):
00326         # past Events sub-topic is in place and has criteria to show
00327         # only past Events Items.
00328         events_topic = self.portal.events.aggregator
00329         self.failUnless('previous' in events_topic.objectIds())
00330         topic = getattr(events_topic, 'previous')
00331         self.assertEqual(topic._getPortalTypeName(), 'Topic')
00332         query = topic.buildQuery()
00333         self.assertEqual(query['Type'], ('Event',))
00334         self.assertEqual(query['review_state'], 'published')
00335         self.assertEqual(query['end']['query'].Date(), DateTime().Date())
00336         self.assertEqual(query['end']['range'], 'max')
00337         self.assertEqual(topic.checkCreationFlag(), False)

Definition at line 311 of file testPortalCreation.py.

00311 
00312     def testEventsTopic(self):
00313         # Events topic is in place as default view and has criterion to show
00314         # only future Events Items.
00315         self.assertEqual(['aggregator'], [i for i in self.portal.events.objectIds()])
00316         topic = getattr(self.portal.events, 'aggregator')
00317         self.assertEqual(topic._getPortalTypeName(), 'Topic')
00318         query = topic.buildQuery()
00319         self.assertEqual(query['Type'], ('Event',))
00320         self.assertEqual(query['review_state'], 'published')
00321         self.assertEqual(query['start']['query'].Date(), DateTime().Date())
00322         self.assertEqual(query['start']['range'], 'min')
00323         self.assertEqual(topic.checkCreationFlag(), False)

Definition at line 258 of file testPortalCreation.py.

00258 
00259     def testEventsTopicIsIndexed(self):
00260         # Events (smart) folder should be cataloged
00261         res = self.catalog(path={'query' : '/plone/events/aggregator', 'depth' : 0})
00262         self.assertEqual(len(res), 1)
00263         self.assertEqual(res[0].getId, 'aggregator')
00264         self.assertEqual(res[0].Title, 'Events')
00265         self.assertEqual(res[0].Description, 'Site Events')

Definition at line 404 of file testPortalCreation.py.

00404 
00405     def testExtEditorMemberdataProperty(self):
00406         # portal_memberdata should have a location property
00407         self.assertEqual(self.memberdata.getProperty('ext_editor'), 0)

Definition at line 136 of file testPortalCreation.py.

00136 
00137     def testFolderEditActionHasEditTitle(self):
00138         # Edit tab of folders should be named 'edit', not 'properties'
00139         folder = self.types.getTypeInfo('Folder')
00140         for action in folder._cloneActions():
00141             if action.id == 'edit':
00142                 self.assertEqual(action.title, 'Edit')
00143                 break
00144         else:
00145             self.fail("Folder has no 'edit' action")

Here is the call graph for this function:

Definition at line 643 of file testPortalCreation.py.

00643 
00644     def testFolderHasAlbumView(self):
00645         # Folder type should allow 'atct_album_view'
00646         self.failUnless('atct_album_view' in self.types.Folder.view_methods)

Definition at line 146 of file testPortalCreation.py.

00146 
00147     def testFolderHasFolderListingAction(self):
00148         # Folders should have a 'folderlisting' action
00149         folder = self.types.getTypeInfo('Folder')
00150         for action in folder._cloneActions():
00151             if action.id == 'folderlisting':
00152                 break
00153         else:
00154             self.fail("Folder has no 'folderlisting' action")

Here is the call graph for this function:

Definition at line 631 of file testPortalCreation.py.

00631 
00632     def testFolderHasFolderListingView(self):
00633         # Folder type should allow 'folder_listing'
00634         self.failUnless('folder_listing' in self.types.Folder.view_methods)

Definition at line 635 of file testPortalCreation.py.

00635 
00636     def testFolderHasSummaryView(self):
00637         # Folder type should allow 'folder_summary_view'
00638         self.failUnless('folder_summary_view' in self.types.Folder.view_methods)

Definition at line 639 of file testPortalCreation.py.

00639 
00640     def testFolderHasTabularView(self):
00641         # Folder type should allow 'folder_tabular_view'
00642         self.failUnless('folder_tabular_view' in self.types.Folder.view_methods)

Definition at line 426 of file testPortalCreation.py.

00426 
00427     def testFolderlistingAction(self):
00428         # Make sure the folderlisting action of a Folder is /view, to ensure
00429         # that the layout template will be resolved (see PloneTool.browserDefault)
00430         self.assertEqual(self.types['Folder'].getActionObject('folder/folderlisting').getActionExpression(),
00431                          'string:${folder_url}/view')
00432         self.assertEqual(self.types['Plone Site'].getActionObject('folder/folderlisting').getActionExpression(),
00433                          'string:${folder_url}/view')

Definition at line 195 of file testPortalCreation.py.

00195 
00196     def testFormToolTipsProperty(self):
00197         # formtooltips should have been removed
00198         self.failIf(self.memberdata.hasProperty('formtooltips'))

Definition at line 178 of file testPortalCreation.py.

00178 
00179     def testFullScreenAction(self):
00180         # There should be a full_screen action
00181         self.failUnless(self.actions.getActionInfo('document_actions/full_screen') is not None)

Definition at line 182 of file testPortalCreation.py.

00182 
00183     def testFullScreenActionIcon(self):
00184         # There should be a full_screen action icon
00185         for icon in self.icons.listActionIcons():
00186             if icon.getActionId() == 'full_screen':
00187                 break
00188         else:
00189             self.fail("Action icons tool has no 'full_screen' icon")

Here is the call graph for this function:

Definition at line 400 of file testPortalCreation.py.

00400 
00401     def testHome_PageMemberdataProperty(self):
00402         # portal_memberdata should have a home_page property
00403         self.failUnless(self.memberdata.hasProperty('home_page'))

Definition at line 696 of file testPortalCreation.py.

00696 
00697     def testHomeActionUsesView(self):
00698         actions = self.actions.listActions()
00699         homeAction = [x for x in actions if x.id == 'index_html'][0]
00700         self.assertEquals(homeAction.getInfoData()[0]['url'].text, 'string:${globals_view/navigationRootUrl}')

Definition at line 155 of file testPortalCreation.py.

00155 
00156     def testImagePatch(self):
00157         # Is it ok to remove the imagePatch? Probably not as we
00158         # don't want the border attribute ...
00159         self.folder.invokeFactory('Image', id='foo', file=dummy.Image())
00160         endswith = ' alt="" title="" height="16" width="16" />'
00161         self.assertEqual(self.folder.foo.tag()[-len(endswith):], endswith)

Definition at line 65 of file testPortalCreation.py.

00065 
00066     def testInstanceVersion(self):
00067         # Test if the version of the instance has been set
00068         mt = self.portal.portal_migration
00069         self.assertEqual(mt._version, mt.getFileSystemVersion())

Definition at line 392 of file testPortalCreation.py.

00392 
00393     def testLanguageMemberdataProperty(self):
00394         # portal_memberdata should have a language property
00395         self.failUnless(self.memberdata.hasProperty('language'))

Definition at line 96 of file testPortalCreation.py.

00096 
00097     def testLargePloneFolderWorkflow(self):
00098         # Large Plone Folder should use folder_workflow
00099         # http://dev.plone.org/plone/ticket/2744
00100         lpf_chain = self.workflow.getChainFor('Large Plone Folder')
00101         self.failUnless('folder_workflow' in lpf_chain)
00102         self.failIf('plone_workflow' in lpf_chain)

Definition at line 388 of file testPortalCreation.py.

00388 
00389     def testLocationMemberdataProperty(self):
00390         # portal_memberdata should have a location property
00391         self.failUnless(self.memberdata.hasProperty('location'))

Definition at line 708 of file testPortalCreation.py.

00708 
00709     def testMakeSnapshot(self):
00710         # GenericSetup snapshot should work
00711         self.setRoles(['Manager'])
00712         snapshot_id = self.setup._mangleTimestampName('test')
00713         self.setup.createSnapshot(snapshot_id)

Here is the call graph for this function:

Definition at line 621 of file testPortalCreation.py.

00621 
00622     def testMemberHasViewGroupsPermission(self):
00623         # Member should be granted the 'View Groups' permission
00624         member_has_permission = [p for p in
00625                 self.portal.permissionsOfRole('Member')
00626                                         if p['name'] == 'View Groups'][0]
00627         self.failUnless(member_has_permission['selected'])

Definition at line 119 of file testPortalCreation.py.

00119 
00120     def testMembersFolderIsIndexed(self):
00121         # Members folder should be cataloged
00122         res = self.catalog(getId='Members')
00123         self.assertEqual(len(res), 1)
00124         self.assertEqual(res[0].getId, 'Members')
00125         self.assertEqual(res[0].Title, 'Users')

Definition at line 113 of file testPortalCreation.py.

00113 
00114     def testMembersFolderMeta(self):
00115         # Members folder should have title 'Users'
00116         members = self.membership.getMembersFolder()
00117         self.assertEqual(members.getId(), 'Members')
00118         self.assertEqual(members.Title(), 'Users')

Definition at line 103 of file testPortalCreation.py.

00103 
00104     def testMembersFolderMetaType(self):
00105         # Members folder should have meta_type 'ATBTreeFolder'
00106         members = self.membership.getMembersFolder()
00107         self.assertEqual(members.meta_type, 'ATBTreeFolder')

Definition at line 108 of file testPortalCreation.py.

00108 
00109     def testMembersFolderPortalType(self):
00110         # Members folder should have portal_type 'Large Plone Folder'
00111         members = self.membership.getMembersFolder()
00112         self.assertEqual(members._getPortalTypeName(), 'Large Plone Folder')

Definition at line 503 of file testPortalCreation.py.

00503 
00504     def testNavigationAndSearchPanelsInstalled(self):
00505         # Navigation and search panels should be installed
00506         haveSearch = False
00507         haveNavigation = False
00508         for panel in self.cp.listActions():
00509             if panel.getId() == 'SearchSettings':
00510                 haveSearch = True
00511             elif panel.getId() == 'NavigationSettings':
00512                 haveNavigation = True
00513         self.failUnless(haveSearch and haveNavigation)

Definition at line 495 of file testPortalCreation.py.

00495 
00496     def testNavigationSettingsActionIcon(self):
00497         # There should be a NavigationSettings action icon
00498         for icon in self.icons.listActionIcons():
00499             if icon.getActionId() == 'NavigationSettings':
00500                 break
00501         else:
00502             self.fail("Action icons tool has no 'NavigationSettings' icon")

Here is the call graph for this function:

Definition at line 199 of file testPortalCreation.py.

00199 
00200     def testNavTreeProperties(self):
00201         # navtree_properties should contain the new properties
00202         self.failUnless(self.properties.navtree_properties.hasProperty('metaTypesNotToList'))
00203         self.failUnless(self.properties.navtree_properties.hasProperty('parentMetaTypesNotToQuery'))
00204         self.failUnless('Large Plone Folder' in
00205                             self.properties.navtree_properties.getProperty('parentMetaTypesNotToQuery'))
00206         self.failUnless(self.properties.navtree_properties.hasProperty('sortAttribute'))
00207         self.failUnless(self.properties.navtree_properties.hasProperty('sortOrder'))
00208         self.failUnless(self.properties.navtree_properties.hasProperty('sitemapDepth'))
00209         self.failUnless(self.properties.navtree_properties.hasProperty('showAllParents'))
00210         self.failUnless(self.properties.navtree_properties.hasProperty('wf_states_to_show'))
00211         self.failUnless(self.properties.navtree_properties.hasProperty('enable_wf_state_filtering'))

Definition at line 654 of file testPortalCreation.py.

00654 
00655     def testNavtreePropertiesNormalized(self):
00656         ntp = self.portal.portal_properties.navtree_properties
00657         toRemove = ['skipIndex_html', 'showMyUserFolderOnly', 'showFolderishSiblingsOnly',
00658                     'showFolderishChildrenOnly', 'showNonFolderishObject', 'showTopicResults',
00659                     'rolesSeeContentView', 'rolesSeeUnpublishedContent', 'rolesSeeContentsView ',
00660                     'batchSize', 'sortCriteria', 'croppingLength', 'forceParentsInBatch',
00661                     'rolesSeeHiddenContent', 'typesLinkToFolderContents']
00662         toAdd = {'name' : '', 'root' : '/', 'currentFolderOnlyInNavtree' : False}
00663         for property in toRemove:
00664             self.assertEqual(ntp.getProperty(property, None), None)
00665         for property, value in toAdd.items():
00666             self.assertEqual(ntp.getProperty(property), value)
00667         self.assertEqual(ntp.getProperty('bottomLevel'), 0)

Definition at line 282 of file testPortalCreation.py.

00282 
00283     def testNewsFolder(self):
00284         self.failUnless('news' in self.portal.objectIds())
00285         folder = getattr(self.portal, 'news')
00286         self.assertEqual(folder.portal_type, 'Large Plone Folder')
00287         self.assertEqual(folder.getDefaultPage(), 'aggregator')
00288         self.assertEqual(folder.getRawLocallyAllowedTypes(), ('News Item',))
00289         self.assertEqual(folder.getRawImmediatelyAddableTypes(), ('News Item',))
00290         self.assertEqual(folder.checkCreationFlag(), False)

Here is the call graph for this function:

Definition at line 266 of file testPortalCreation.py.

00266 
00267     def testNewsFolderIsIndexed(self):
00268         # News folder should be cataloged
00269         res = self.catalog(path={'query' : '/plone/news', 'depth' : 0})
00270         self.assertEqual(len(res), 1)
00271         self.assertEqual(res[0].getId, 'news')
00272         self.assertEqual(res[0].Title, 'News')
00273         self.assertEqual(res[0].Description, 'Site News')

Definition at line 300 of file testPortalCreation.py.

00300 
00301     def testNewsTopic(self):
00302         # News topic is in place as default view and has a criterion to show
00303         # only News Items, and uses the folder_summary_view.
00304         self.assertEqual(['aggregator'], [i for i in self.portal.news.objectIds()])
00305         topic = getattr(self.portal.news, 'aggregator')
00306         self.assertEqual(topic._getPortalTypeName(), 'Topic')
00307         self.assertEqual(topic.buildQuery()['Type'], ('News Item',))
00308         self.assertEqual(topic.buildQuery()['review_state'], 'published')
00309         self.assertEqual(topic.getLayout(), 'folder_summary_view')
00310         self.assertEqual(topic.checkCreationFlag(), False)

Definition at line 250 of file testPortalCreation.py.

00250 
00251     def testNewsTopicIsIndexed(self):
00252         # News (smart) folder should be cataloged
00253         res = self.catalog(path={'query' : '/plone/news/aggregator', 'depth' : 0})
00254         self.assertEqual(len(res), 1)
00255         self.assertEqual(res[0].getId, 'aggregator')
00256         self.assertEqual(res[0].Title, 'News')
00257         self.assertEqual(res[0].Description, 'Site News')

Definition at line 170 of file testPortalCreation.py.

00170 
00171     def testNoFormProperties(self):
00172         # form_properties should have been removed
00173         self.failIf('form_properties' in self.properties.objectIds())

Definition at line 78 of file testPortalCreation.py.

00078 
00079     def testNoIndexHtmlDocument(self):
00080         # The portal should not contain an index_html Document
00081         self.failIf('index_html' in self.portal.objectIds())

Definition at line 238 of file testPortalCreation.py.

00238 
00239     def testNoMembersAction(self):
00240         # There should not be a Members action
00241         for action in self.actions.listActions():
00242             if action.getId() == 'Members':
00243                 self.fail("Actions tool still has 'Members' action")

Here is the call graph for this function:

Definition at line 471 of file testPortalCreation.py.

00471 
00472     def testNoMembershipToolPloneSetupAction(self):
00473         try:
00474             self.failUnless(self.actions.getActionInfo('user/plone_setup'))
00475         except ValueError:
00476             pass
00477         else:
00478             self.fail('Found plone_setup action in user category.')

Here is the call graph for this function:

Definition at line 174 of file testPortalCreation.py.

00174 
00175     def testNoNavigationProperties(self):
00176         # navigation_properties should have been removed
00177         self.failIf('navigation_properties' in self.properties.objectIds())

Definition at line 231 of file testPortalCreation.py.

00231 
00232     def testNonDefaultPageTypes(self):
00233         # We should have a default_page_types property
00234         self.failUnless(self.properties.site_properties.hasProperty('default_page_types'))
00235         self.failUnless('Folder' not in self.properties.site_properties.getProperty('default_page_types'))
00236         self.failUnless('Large Plone Folder' not in self.properties.site_properties.getProperty('default_page_types'))
00237         self.failUnless('Topic' in self.properties.site_properties.getProperty('default_page_types'))

Definition at line 244 of file testPortalCreation.py.

00244 
00245     def testNoNewsAction(self):
00246         # There should not be a news action
00247         for action in self.actions.listActions():
00248             if action.getId() == 'news':
00249                 self.fail("Actions tool still has 'News' action")

Here is the call graph for this function:

Definition at line 871 of file testPortalCreation.py.

00871 
00872     def testNonFolderishTabsProperty(self):
00873         self.assertEquals(False, self.properties.site_properties.disable_nonfolderish_sections)

Definition at line 162 of file testPortalCreation.py.

00162 
00163     def testNoPortalFormTool(self):
00164         # portal_form should have been removed
00165         self.failIf('portal_form' in self.portal.objectIds())

Definition at line 166 of file testPortalCreation.py.

00166 
00167     def testNoPortalNavigationTool(self):
00168         # portal_navigation should have been removed
00169         self.failIf('portal_navigation' in self.portal.objectIds())

Definition at line 338 of file testPortalCreation.py.

00338 
00339     def testObjectButtonActions(self):
00340         self.setRoles(['Manager', 'Member'])
00341         atool = self.actions
00342         self.failIf(atool.getActionInfo('object_buttons/cut') is None)
00343         self.failIf(atool.getActionInfo('object_buttons/copy') is None)
00344         self.failIf(atool.getActionInfo('object_buttons/paste') is None)
00345         self.failIf(atool.getActionInfo('object_buttons/delete') is None)

Here is the call graph for this function:

Definition at line 582 of file testPortalCreation.py.

00582 
00583     def testObjectButtonActionsInExpectedOrder(self):
00584         # The object buttons need to be in a standardized order
00585         self.setRoles(['Manager', 'Member'])
00586         # fill the copy buffer so we see all actions
00587         self.folder.cb_dataValid = True
00588         acts = self.actions.listFilteredActionsFor(self.folder)
00589         buttons = acts['object_buttons']
00590         self.assertEqual(len(buttons),5)
00591         ids = [(a['id']) for a in buttons]
00592         self.assertEqual(ids, ['cut','copy','paste','delete', 'rename',])

Here is the call graph for this function:

Definition at line 544 of file testPortalCreation.py.

00544 
00545     def testObjectButtonActionsInvisibleOnPortalDefaultDocument(self):
00546         # only a manager would have proper permissions
00547         self.setRoles(['Manager', 'Member'])
00548         self.portal.invokeFactory('Document','index_html')
00549         acts = self.actions.listFilteredActionsFor(self.portal.index_html)
00550         buttons = acts.get('object_buttons', [])
00551         self.assertEquals(0, len(buttons))

Here is the call graph for this function:

Definition at line 537 of file testPortalCreation.py.

00537 
00538     def testObjectButtonActionsInvisibleOnPortalRoot(self):
00539         # only a manager would have proper permissions
00540         self.setRoles(['Manager', 'Member'])
00541         acts = self.actions.listFilteredActionsFor(self.portal)
00542         buttons = acts.get('object_buttons',[])
00543         self.assertEquals(0, len(buttons))

Here is the call graph for this function:

Definition at line 552 of file testPortalCreation.py.

00552 
00553     def testObjectButtonActionsOnDefaultDocumentApplyToParent(self):
00554         # only a manager would have proper permissions
00555         self.setRoles(['Manager', 'Member'])
00556         self.folder.invokeFactory('Document','index_html')
00557         acts = self.actions.listFilteredActionsFor(self.folder.index_html)
00558         buttons = acts['object_buttons']
00559         self.assertEqual(len(buttons), 4)
00560         urls = [a['url'] for a in buttons]
00561         for url in urls:
00562             self.failIf('index_html' in url, 'Action wrongly applied to default page object %s'%url)

Here is the call graph for this function:

Definition at line 563 of file testPortalCreation.py.

00563 
00564     def testObjectButtonActionsPerformCorrectAction(self):
00565         # only a manager would have proper permissions
00566         self.setRoles(['Manager', 'Member'])
00567         self.folder.invokeFactory('Document','index_html')
00568         acts = self.actions.listFilteredActionsFor(self.folder.index_html)
00569         buttons = acts['object_buttons']
00570         self.assertEqual(len(buttons), 4)
00571         # special case for delete which needs a confirmation form
00572         urls = [(a['id'],a['url']) for a in buttons
00573                 if a['id'] not in ('delete',)]
00574         for url in urls:
00575             # ensure that e.g. the 'copy' url contains object_copy
00576             self.failUnless('object_'+url[0] in url[1], "%s does not perform the expected object_%s action"%(url[0],url[0]))
00577 
00578         delete_action = [(a['id'],a['url']) for a in buttons
00579                 if a['id'] == 'delete'][0]
00580         self.failUnless('delete_confirmation' in delete_action[1],
00581                          "object_delete does not use the confirmation form")

Here is the call graph for this function:

Definition at line 514 of file testPortalCreation.py.

00514 
00515     def testOwnerHasAccessInactivePermission(self):
00516         permission_on_role = [p for p in self.portal.permissionsOfRole('Owner')
00517             if p['name'] == AccessInactivePortalContent][0]
00518         self.failUnless(permission_on_role['selected'])
00519         cur_perms = self.portal.permission_settings(
00520                             AccessInactivePortalContent)[0]
00521         self.failUnless(cur_perms['acquire'])

Definition at line 593 of file testPortalCreation.py.

00593 
00594     def testPlone3rdPartyLayerInDefault(self):
00595         # plone_3rdParty layer should exist
00596         path = self.skins.getSkinPath('Plone Default')
00597         self.failUnless('plone_3rdParty' in path)

Definition at line 701 of file testPortalCreation.py.

00701 
00702     def testPloneLexicon(self):
00703         # Plone lexicon should use new splitter and case normalizer
00704         pipeline = self.catalog.plone_lexicon._pipeline
00705         self.failUnless(len(pipeline) >= 2)
00706         self.failUnless(isinstance(pipeline[0], Splitter))
00707         self.failUnless(isinstance(pipeline[1], CaseNormalizer))

Definition at line 598 of file testPortalCreation.py.

00598 
00599     def testPloneLoginLayerInDefault(self):
00600         # plone_login layer should exist
00601         path = self.skins.getSkinPath('Plone Default')
00602         self.failUnless('plone_login' in path)

Definition at line 451 of file testPortalCreation.py.

00451 
00452     def testPloneSiteFTIHasMethodAliases(self):
00453         # Should add method aliases to the Plone Site FTI
00454         expected_aliases = {
00455                 '(Default)'  : '(dynamic view)',
00456                 'view'       : '(selected layout)',
00457                 'edit'       : 'folder_edit_form',
00458                 'sharing'    : '@@sharing',
00459               }
00460         fti = self.portal.getTypeInfo()
00461         aliases = fti.getMethodAliases()
00462         self.assertEqual(aliases, expected_aliases)

Definition at line 70 of file testPortalCreation.py.

00070 
00071     def testPloneSkins(self):
00072         # Plone skins should have been set up
00073         self.failUnless(hasattr(self.folder, 'plone_powered.gif'))

Here is the call graph for this function:

Definition at line 874 of file testPortalCreation.py.

00874 
00875     def testPortalContentLanguage(self):
00876         from zope.app.testing.ztapi import provideUtility
00877         from zope.i18n.interfaces import ITranslationDomain
00878         from zope.i18n.simpletranslationdomain import SimpleTranslationDomain
00879 
00880         # Let's fake the news title translations
00881         messages = {
00882             ('de', u'news-title'): u'Foo',
00883             ('pt_BR', u'news-title'): u'Bar',
00884         }
00885         pfp = SimpleTranslationDomain('plonefrontpage', messages)
00886         provideUtility(ITranslationDomain, pfp, 'plonefrontpage')
00887 
00888         # Setup the generator and the new placeholder folders
00889         gen = setuphandlers.PloneGenerator()
00890         self.folder.invokeFactory('Folder', 'brazilian')
00891         self.folder.invokeFactory('Folder', 'german')
00892 
00893         # Check if the content is being created in German
00894         self.app.REQUEST['HTTP_ACCEPT_LANGUAGE'] = 'de'
00895         gen.setupPortalContent(self.folder.german)
00896         self.failUnlessEqual(self.folder.german.news.Title(), 'Foo')
00897 
00898         # Check if the content is being created in a composite
00899         # language code, in this case Brazilian Portuguese
00900         self.app.REQUEST['HTTP_ACCEPT_LANGUAGE'] = 'pt-br'
00901         gen.setupPortalContent(self.folder.brazilian)
00902         self.failUnlessEqual(self.folder.brazilian.news.Title(), 'Bar')
00903 

Definition at line 446 of file testPortalCreation.py.

00446 
00447     def testPortalFTIIsDynamicFTI(self):
00448         # Plone Site FTI should be a DynamicView FTI
00449         fti = self.portal.getTypeInfo()
00450         self.assertEqual(fti.meta_type, 'Factory-based Type Information with dynamic views')

Definition at line 487 of file testPortalCreation.py.

00487 
00488     def testPortalUsesMethodAliases(self):
00489         fti = self.portal.getTypeInfo()
00490         for action in fti.listActions():
00491             if action.getId() == 'edit':
00492                 self.assertEqual(action.getActionExpression(), 'string:${object_url}/edit')
00493             if action.getId() == 'sharing':
00494                 self.assertEqual(action.getActionExpression(), 'string:${object_url}/sharing')

Definition at line 776 of file testPortalCreation.py.

00776 
00777     def testPortletAssignmentsAtRoot(self):
00778         leftColumn = getUtility(IPortletManager, name=u'plone.leftcolumn')
00779         rightColumn = getUtility(IPortletManager, name=u'plone.rightcolumn')
00780 
00781         left = getMultiAdapter((self.portal, leftColumn,), IPortletAssignmentMapping)
00782         right = getMultiAdapter((self.portal, rightColumn,), IPortletAssignmentMapping)
00783 
00784         self.assertEquals(len(left), 2)
00785         self.assertEquals(len(right), 4)

Here is the call graph for this function:

Definition at line 786 of file testPortalCreation.py.

00786 
00787     def testPortletBlockingForMembersFolder(self):
00788         members = self.portal.Members
00789         rightColumn = getUtility(IPortletManager, name=u'plone.rightcolumn')
00790         portletAssignments = getMultiAdapter((members, rightColumn,), ILocalPortletAssignmentManager)
00791         self.assertEquals(True, portletAssignments.getBlacklistStatus(CONTEXT_PORTLETS))

Definition at line 769 of file testPortalCreation.py.

00769 
00770     def testPortletManagersInstalled(self):
00771         sm = getSiteManager(self.portal)
00772         registrations = [r.name for r in sm.registeredUtilities()
00773                             if IPortletManager == r.provided]
00774         self.assertEquals(['plone.dashboard1', 'plone.dashboard2', 'plone.dashboard3', 'plone.dashboard4',
00775                             'plone.leftcolumn', 'plone.rightcolumn'], sorted(registrations))

Here is the call graph for this function:

Definition at line 834 of file testPortalCreation.py.

00834 
00835     def testReaderEditorRoles(self):
00836         self.failUnless('Reader' in self.portal.valid_roles())
00837         self.failUnless('Editor' in self.portal.valid_roles())
00838         self.failUnless('Reader' in self.portal.acl_users.portal_role_manager.listRoleIds())
00839         self.failUnless('Editor' in self.portal.acl_users.portal_role_manager.listRoleIds())
00840         self.failUnless('View' in [r['name'] for r in self.portal.permissionsOfRole('Reader') if r['selected']])
00841         self.failUnless('Modify portal content' in [r['name'] for r in self.portal.permissionsOfRole('Editor') if r['selected']])

Definition at line 220 of file testPortalCreation.py.

00220 
00221     def testResourceRegistries(self):
00222         # We should have portal_css and portal_javascripts tools
00223         self.failUnless(hasattr(self.portal, 'portal_css'))
00224         self.failUnless(hasattr(self.portal, 'portal_kss'))
00225         self.failUnless(hasattr(self.portal, 'portal_javascripts'))

Here is the call graph for this function:

Definition at line 438 of file testPortalCreation.py.

00438 
00439     def testSearchSettingsActionIcon(self):
00440         # There should be a SearchSettings action icon
00441         for icon in self.icons.listActionIcons():
00442             if icon.getActionId() == 'SearchSettings':
00443                 break
00444         else:
00445             self.fail("Action icons tool has no 'SearchSettings' icon")

Here is the call graph for this function:

Definition at line 866 of file testPortalCreation.py.

00866 
00867     def testSecondaryEditorPermissionsGivenToEditorRole(self):
00868         for p in ['Manage properties', 'Modify view template', 'Request review']:
00869             self.failUnless(p in [r['name'] for r in
00870                                 self.portal.permissionsOfRole('Editor') if r['selected']])

Definition at line 126 of file testPortalCreation.py.

00126 
00127     def testSecureMailHost(self):
00128         # MailHost should be of the SMH variety
00129         mailhost = self.portal.plone_utils.getMailHost()
00130         self.assertEqual(mailhost.meta_type, 'Secure Mail Host')

Definition at line 377 of file testPortalCreation.py.

00377 
00378     def testSelectableViewsOnFolder(self):
00379         views = self.portal.portal_types.Folder.getAvailableViewMethods(None)
00380         self.failUnless('folder_listing' in views)
00381         self.failUnless('atct_album_view' in views)

Definition at line 382 of file testPortalCreation.py.

00382 
00383     def testSelectableViewsOnTopic(self):
00384         views = self.portal.portal_types.Topic.getAvailableViewMethods(None)
00385         self.failUnless('folder_listing' in views)
00386         self.failUnless('atct_album_view' in views)
00387         self.failUnless('atct_topic_view' in views)

Definition at line 858 of file testPortalCreation.py.

00858 
00859     def testSharingAction(self):
00860         # Should be in portal_actions
00861         self.failUnless('local_roles' in self.actions.object.objectIds())
00862 
00863         # Should not be in any of the default FTIs
00864         for fti in self.types.objectValues():
00865             self.failIf('local_roles' in [a.id for a in fti.listActions()])

Definition at line 463 of file testPortalCreation.py.

00463 
00464     def testSiteActions(self):
00465         self.setRoles(['Manager', 'Member'])
00466         atool = self.actions
00467         self.failIf(atool.getActionInfo('site_actions/sitemap') is None)
00468         self.failIf(atool.getActionInfo('site_actions/contact') is None)
00469         self.failIf(atool.getActionInfo('site_actions/accessibility') is None)
00470         self.failIf(atool.getActionInfo('site_actions/plone_setup') is None)

Here is the call graph for this function:

Definition at line 718 of file testPortalCreation.py.

00718 
00719     def testSiteManagerSetup(self):
00720         clearSite()
00721         # The portal should be an ISite
00722         self.failUnless(ISite.providedBy(self.portal))
00723         # There should be a IComponentRegistry
00724         comp = IComponentLookup(self.portal)
00725         IComponentRegistry.providedBy(comp)
00726 
00727         # Test if we get the right site managers
00728         gsm = getGlobalSiteManager()
00729         sm = getSiteManager()
00730         # Without setting the site we should get the global site manager
00731         self.failUnless(sm is gsm)
00732 
00733         # Now we set the site, as it is done in url traversal normally
00734         setSite(self.portal)
00735         # And should get the local site manager
00736         sm = getSiteManager()
00737         self.failUnless(aq_base(sm) is aq_base(comp))

Here is the call graph for this function:

Definition at line 212 of file testPortalCreation.py.

00212 
00213     def testSitemapAction(self):
00214         # There should be a sitemap action
00215         for action in self.actions.listActions():
00216             if action.getId() == 'sitemap':
00217                 break
00218         else:
00219             self.fail("Actions tool has no 'sitemap' action")

Here is the call graph for this function:

Definition at line 417 of file testPortalCreation.py.

00417 
00418     def testSiteSetupAction(self):
00419         # There should be a Site Setup action
00420         for action in self.actions.listActions():
00421             if action.getId() == 'plone_setup':
00422                 self.assertEqual(action.title, 'Site Setup')
00423                 break
00424         else:
00425             self.fail("Actions tool has no 'sitemap' action")

Here is the call graph for this function:

Definition at line 522 of file testPortalCreation.py.

00522 
00523     def testSyndicationEnabledByDefault(self):
00524         syn = self.portal.portal_syndication
00525         self.failUnless(syn.isSiteSyndicationAllowed())

Definition at line 526 of file testPortalCreation.py.

00526 
00527     def testSyndicationEnabledOnNewsAndEvents(self):
00528         syn = self.portal.portal_syndication
00529         self.failUnless(syn.isSyndicationAllowed(self.portal.news.aggregator))
00530         self.failUnless(syn.isSyndicationAllowed(self.portal.events.aggregator))

Definition at line 531 of file testPortalCreation.py.

00531 
00532     def testSyndicationTabDisabled(self):
00533         # Syndication tab should be disabled by default
00534         for action in self.actions.listActions():
00535             if action.getId() == 'syndication' and action.visible:
00536                 self.fail("Actions tool still has visible 'syndication' action")

Here is the call graph for this function:

Definition at line 479 of file testPortalCreation.py.

00479 
00480     def testTypesHaveSelectedLayoutViewAction(self):
00481         # Should add method aliases to the Plone Site FTI
00482         types = ('Document', 'Event', 'Favorite', 'File', 'Folder', 'Image', 'Link', 'News Item', 'Topic', 'Plone Site')
00483         for typeName in types:
00484             fti = getattr(self.types, typeName)
00485             aliases = fti.getMethodAliases()
00486             self.assertEqual(aliases['view'], '(selected layout)')

Definition at line 413 of file testPortalCreation.py.

00413 
00414     def testTypesUseViewActionInListingsProperty(self):
00415         # site_properties should have the typesUseViewActionInListings property
00416         self.failUnless(self.properties.site_properties.hasProperty('typesUseViewActionInListings'))

Definition at line 226 of file testPortalCreation.py.

00226 
00227     def testUnfriendlyTypesProperty(self):
00228         # We should have an types_not_searched property
00229         self.failUnless(self.properties.site_properties.hasProperty('types_not_searched'))
00230         self.failUnless('Plone Site' in self.properties.site_properties.getProperty('types_not_searched'))

Definition at line 131 of file testPortalCreation.py.

00131 
00132     def testUseFolderContentsProperty(self):
00133         # The use_folder_contents site property should be emtpy
00134         props = self.portal.portal_properties.site_properties
00135         self.assertEqual(props.getProperty('use_folder_contents'), ())

Definition at line 738 of file testPortalCreation.py.

00738 
00739     def testUtilityRegistration(self):
00740         gsm = getGlobalSiteManager()
00741         global_util = dummy.DummyUtility()
00742 
00743         # Register a global utility and see if we can get it
00744         gsm.registerUtility(global_util, dummy.IDummyUtility)
00745         getutil = getUtility(dummy.IDummyUtility)
00746         self.assertEquals(getutil, global_util)
00747 
00748         # Register a local utility and see if we can get it
00749         sm = getSiteManager()
00750         local_util = dummy.DummyUtility()
00751 
00752         sm.registerUtility(local_util, dummy.IDummyUtility)
00753         getutil = getUtility(dummy.IDummyUtility)
00754         self.assertEquals(getutil, local_util)
00755         # Clean up the site again
00756         clearSite()
00757 
00758         # Without a site we get the global utility
00759         getutil = getUtility(dummy.IDummyUtility)
00760         self.assertEquals(getutil, global_util)
00761 
00762         # Clean up again and unregister the utilites
00763         gsm.unregisterUtility(provided=dummy.IDummyUtility)
00764         sm.unregisterUtility(provided=dummy.IDummyUtility)
00765 
00766         # Make sure unregistration was successful
00767         util = queryUtility(dummy.IDummyUtility)
00768         self.failUnless(util is None)

Definition at line 714 of file testPortalCreation.py.

00714 
00715     def testValidateEmail(self):
00716         # validate_email should be on by default
00717         self.failUnless(self.portal.getProperty('validate_email'))

Definition at line 668 of file testPortalCreation.py.

00668 
00669     def testvcXMLRPCRemoved(self):
00670         # vcXMLRPC.js should no longer be registered
00671         self.failIf('vcXMLRPC.js' in self.javascripts.getResourceIds())

Definition at line 190 of file testPortalCreation.py.

00190 
00191     def testVisibleIdsProperties(self):
00192         # visible_ids should be a site property and a memberdata property
00193         self.failUnless(self.properties.site_properties.hasProperty('visible_ids'))
00194         self.failUnless(self.memberdata.hasProperty('visible_ids'))

Definition at line 92 of file testPortalCreation.py.

00092 
00093     def testWorkflowIsActionProvider(self):
00094         # The workflow tool is one of the last remaining action providers.
00095         self.failUnless('portal_workflow' in self.actions.listActionProviders())

Definition at line 842 of file testPortalCreation.py.

00842 
00843     def testWorkflowsInstalled(self):
00844         for wf in ['intranet_workflow', 'intranet_folder_workflow',
00845                 'one_state_workflow', 'simple_publication_workflow']:
00846             self.failUnless(wf in self.portal.portal_workflow.objectIds())


Member Data Documentation

Definition at line 50 of file testPortalCreation.py.

Definition at line 54 of file testPortalCreation.py.

Definition at line 49 of file testPortalCreation.py.

Definition at line 56 of file testPortalCreation.py.

Definition at line 55 of file testPortalCreation.py.

Definition at line 51 of file testPortalCreation.py.

Definition at line 59 of file testPortalCreation.py.

Definition at line 53 of file testPortalCreation.py.

Definition at line 46 of file testPortalCreation.py.

Definition at line 52 of file testPortalCreation.py.

Definition at line 60 of file testPortalCreation.py.

Definition at line 57 of file testPortalCreation.py.

Definition at line 58 of file testPortalCreation.py.

Definition at line 48 of file testPortalCreation.py.

Definition at line 47 of file testPortalCreation.py.


The documentation for this class was generated from the following file: