Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
plone.app.portlets.tests.test_utils.TestAssignmentFromKey Class Reference
Inheritance diagram for plone.app.portlets.tests.test_utils.TestAssignmentFromKey:
Inheritance graph
[legend]
Collaboration diagram for plone.app.portlets.tests.test_utils.TestAssignmentFromKey:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testGetPortletFromContext
def testGetPortletFromUserCategory

Public Attributes

 manager
 cat

Detailed Description

Definition at line 19 of file test_utils.py.


Member Function Documentation

Definition at line 21 of file test_utils.py.

00021 
00022     def afterSetUp(self):
00023         setHooks()
00024         setSite(self.portal)
00025         self.manager = getUtility(IPortletManager, name=u'plone.leftcolumn')
00026         self.cat = self.manager[USER_CATEGORY]
00027         self.cat[user_name] = PortletAssignmentMapping(manager=u'plone.leftcolumn',
00028                                                        category=USER_CATEGORY,
00029                                                        name=user_name)

Here is the call graph for this function:

Definition at line 30 of file test_utils.py.

00030 
00031     def testGetPortletFromContext(self):
00032         mapping = getMultiAdapter((self.folder, self.manager,), IPortletAssignmentMapping)
00033         c = classic.Assignment()
00034         mapping['foo'] = c
00035         path = '/'.join(self.folder.getPhysicalPath())
00036         a = assignment_from_key(self.portal, u'plone.leftcolumn', CONTEXT_CATEGORY, path, 'foo')
00037         self.assertEquals(c, a)

Here is the call graph for this function:

Definition at line 38 of file test_utils.py.

00038 
00039     def testGetPortletFromUserCategory(self):
00040         c = classic.Assignment()
00041         self.cat[user_name]['foo'] = c
00042         a = assignment_from_key(self.portal, u'plone.leftcolumn', USER_CATEGORY, user_name, 'foo')
00043         self.assertEquals(c, a)

Here is the call graph for this function:


Member Data Documentation

Definition at line 25 of file test_utils.py.

Definition at line 24 of file test_utils.py.


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