Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
Archetypes.tests.test_cmfessentials.TestPermissions Class Reference
Inheritance diagram for Archetypes.tests.test_cmfessentials.TestPermissions:
Inheritance graph
Collaboration diagram for Archetypes.tests.test_cmfessentials.TestPermissions:
Collaboration graph

List of all members.

Public Member Functions

def afterSetUp
def testPermissions
def testRendering

Public Attributes


Static Public Attributes

list demo_types

Detailed Description

Definition at line 38 of file

Member Function Documentation

Definition at line 42 of file

00043     def afterSetUp(self):
00044         ATSiteTestCase.afterSetUp(self)
00045         # install AT within portal
00046         self.login()
00047         self.demo_instances = []
00048         for t in self.demo_types:
00049             # XXX: Fails with "Unauthorized" exception from
00050             #      CMFDefault/, in overrideDiscussionFor
00051             #
00052             #      Note that BaseObject.initializeArchetype has a bare except
00053             #      that prints out the error instead of letting it through, so
00054             #      that there is no exception when running the test.
00055             inst = makeContent(self.folder, portal_type=t, id=t)
00056             self.demo_instances.append(inst)

Here is the call graph for this function:

Definition at line 57 of file

00058     def testPermissions(self):
00059         for content in self.demo_instances:
00060             # XXX: Strangely enough we have correct permissions here, but not so
00061             #      in initializeArchetype
00062             self.failUnless(checkPerm(permissions.View, content))
00063             self.failUnless(checkPerm(permissions.AccessContentsInformation, content))
00064             self.failUnless(checkPerm(permissions.ModifyPortalContent, content))

Definition at line 65 of file

00066     def testRendering(self):
00067         # Attempt to call each object and make sure it presents a rendered
00068         # html view
00069         for content in self.demo_instances:
00070             self.failUnless(isinstance(content(), basestring))
00071             self.failUnless(content().strip().startswith('<!DOCTYPE'))

Here is the call graph for this function:

Member Data Documentation

Definition at line 46 of file

Initial value:
['DDocument', 'SimpleType', 'SimpleFolder',
                  'Fact', 'ComplexType']

Definition at line 39 of file

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