Back to index

plone3  3.1.7
Public Member Functions | Private Attributes
Archetypes.tests.test_metadata.ExtMetadataContextTest Class Reference
Inheritance diagram for Archetypes.tests.test_metadata.ExtMetadataContextTest:
Inheritance graph
[legend]
Collaboration diagram for Archetypes.tests.test_metadata.ExtMetadataContextTest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testContext
def testUnwrappedContext
def testIsParent

Private Attributes

 _dummy
 _parent

Detailed Description

Definition at line 175 of file test_metadata.py.


Member Function Documentation

Definition at line 177 of file test_metadata.py.

00177 
00178     def afterSetUp(self):
00179         ATSiteTestCase.afterSetUp(self)
00180         self._dummy = mkDummyInContext(klass=Dummy, oid='dummy',
00181                                        context=self.portal, schema=schema)
00182         gen_class(DummyFolder)
00183         portal = self.portal
00184 
00185         # to enable overrideDiscussionFor
00186         self.setRoles(['Manager'])
00187 
00188         parent = mkDummyInContext(klass=DummyFolder, oid='parent',
00189                                   context=portal, schema=None)
00190         self._parent = parent
00191 
00192         # create dummy in context of a plone folder
00193         self._dummy = mkDummyInContext(klass=Dummy, oid='dummy',
00194                                        context=parent, schema=None)

Definition at line 195 of file test_metadata.py.

00195 
00196     def testContext(self):
00197         addMetadataTo(self._parent, data='parent', time=1001)
00198         addMetadataTo(self._parent.dummy, data='dummy', time=9998)
00199 
00200         compareMetadataOf(self, self._parent, data='parent', time=1001)
00201         compareMetadataOf(self, self._parent.dummy, data='dummy', time=9998)

Here is the call graph for this function:

Definition at line 209 of file test_metadata.py.

00209 
00210     def testIsParent(self):
00211         portal = self.portal
00212         self.failUnless(aq_parent(self._parent) == portal)
00213         dummy_parent = aq_base(aq_parent(self._parent.dummy))
00214         parent = aq_base(self._parent)
00215         self.failUnless(dummy_parent is parent,
00216                         ('Parent is not the parent of dummy! '
00217                          'Some tests will give you false results!'))
00218 

Here is the call graph for this function:

Definition at line 202 of file test_metadata.py.

00202 
00203     def testUnwrappedContext(self):
00204         addMetadataTo(self._parent, data='parent', time=1001)
00205         addMetadataTo(self._parent.dummy, data='dummy', time=9998)
00206 
00207         compareMetadataOf(self, aq_base(self._parent), data='parent', time=1001)
00208         compareMetadataOf(self, aq_base(self._parent.dummy), data='dummy', time=9998)

Here is the call graph for this function:


Member Data Documentation

Definition at line 179 of file test_metadata.py.

Definition at line 189 of file test_metadata.py.


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