Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testTraverseToName
def testTraverseToView
def testTraverseToNonExistent

Public Attributes

 mapping
 traverser

Detailed Description

Definition at line 53 of file test_mapping.py.


Member Function Documentation

Definition at line 55 of file test_mapping.py.

00055 
00056     def afterSetUp(self):
00057         self.mapping = PortletAssignmentMapping()
00058         c = classic.Assignment()
00059         self.mapping['foo'] = c
00060         self.traverser = getMultiAdapter((self.mapping, self.folder.REQUEST), IBrowserPublisher)

Definition at line 61 of file test_mapping.py.

00061 
00062     def testTraverseToName(self):
00063         obj = self.traverser.publishTraverse(self.folder.REQUEST, 'foo')
00064         self.failUnless(aq_base(obj) is self.mapping['foo'])
00065         self.failUnless(obj.aq_parent is self.mapping)

Definition at line 71 of file test_mapping.py.

00071 
00072     def testTraverseToNonExistent(self):
00073         self.assertRaises(NotFound, self.traverser.publishTraverse, self.folder.REQUEST, 'bar')

Definition at line 66 of file test_mapping.py.

00066 
00067     def testTraverseToView(self):
00068         view = self.traverser.publishTraverse(self.folder.REQUEST, '+')
00069         self.failUnless(isinstance(view, PortletAdding))
00070         self.failUnless(view.aq_parent is self.mapping)


Member Data Documentation

Definition at line 56 of file test_mapping.py.

Definition at line 59 of file test_mapping.py.


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