Back to index

plone3  3.1.7
Public Member Functions
plone.app.portlets.tests.test_traversal.TestTraversal Class Reference
Inheritance diagram for plone.app.portlets.tests.test_traversal.TestTraversal:
Inheritance graph
[legend]
Collaboration diagram for plone.app.portlets.tests.test_traversal.TestTraversal:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testContextNamespace
def testDashboardNamespace
def testGroupNamespace
def testContentTypeNamespace

Detailed Description

Definition at line 16 of file test_traversal.py.


Member Function Documentation

Definition at line 18 of file test_traversal.py.

00018 
00019     def afterSetUp(self):
00020         setHooks()
00021         setSite(self.portal)

Here is the call graph for this function:

Definition at line 50 of file test_traversal.py.

00050 
00051     def testContentTypeNamespace(self):
00052         assignment = classic.Assignment()
00053         manager = getUtility(IPortletManager, name='plone.leftcolumn')
00054         mapping = self.portal.restrictedTraverse('++contenttypeportlets++plone.leftcolumn+Image')
00055         self.failUnless(aq_parent(mapping) is self.portal)
00056         mapping['foo'] = assignment
00057         self.failUnless(manager[CONTENT_TYPE_CATEGORY]['Image']['foo'] is assignment)
00058         self.assertEquals('++contenttypeportlets++plone.leftcolumn+Image', mapping.id)

Here is the call graph for this function:

Definition at line 22 of file test_traversal.py.

00022 
00023     def testContextNamespace(self):
00024         assignment = classic.Assignment()
00025         manager = getUtility(IPortletManager, name='plone.leftcolumn')
00026         mapping = self.folder.restrictedTraverse('++contextportlets++plone.leftcolumn')
00027         target = getMultiAdapter((self.folder, manager), IPortletAssignmentMapping)
00028         self.failUnless(aq_parent(mapping) is self.folder)
00029         mapping['foo'] = assignment
00030         self.failUnless(target['foo'] is assignment)
00031         self.assertEquals('++contextportlets++plone.leftcolumn', mapping.id)

Here is the call graph for this function:

Definition at line 32 of file test_traversal.py.

00032 
00033     def testDashboardNamespace(self):
00034         assignment = classic.Assignment()
00035         manager = getUtility(IPortletManager, name='plone.dashboard1')
00036         mapping = self.portal.restrictedTraverse('++dashboard++plone.dashboard1+' + user_name)
00037         self.failUnless(aq_parent(mapping) is self.portal)
00038         mapping['foo'] = assignment
00039         self.failUnless(manager[USER_CATEGORY][user_name]['foo'] is assignment)
00040         self.assertEquals('++dashboard++plone.dashboard1+' + user_name, mapping.id)

Here is the call graph for this function:

Definition at line 41 of file test_traversal.py.

00041 
00042     def testGroupNamespace(self):
00043         assignment = classic.Assignment()
00044         manager = getUtility(IPortletManager, name='plone.leftcolumn')
00045         mapping = self.portal.restrictedTraverse('++groupportlets++plone.leftcolumn+Reviewers')
00046         self.failUnless(aq_parent(mapping) is self.portal)
00047         mapping['foo'] = assignment
00048         self.failUnless(manager[GROUP_CATEGORY]['Reviewers']['foo'] is assignment)
00049         self.assertEquals('++groupportlets++plone.leftcolumn+Reviewers', mapping.id)

Here is the call graph for this function:


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