Back to index

plone3  3.1.7
Classes | Functions
wicked.at.tests.test_scope Namespace Reference

Classes

class  IScopedField
class  Scoped
class  TestWickedScope

Functions

def scopeTester
def test_suite

Function Documentation

def wicked.at.tests.test_scope.scopeTester (   field,
  context 
)
a demo scope function for testing, returns a scope that includes
the parent of the current container, but not anything two levels
(or more) up

Definition at line 24 of file test_scope.py.

00024 
00025 def scopeTester(field, context):
00026     """
00027     a demo scope function for testing, returns a scope that includes
00028     the parent of the current container, but not anything two levels
00029     (or more) up
00030     """
00031     scope_obj = context.aq_inner.aq_parent
00032     if not context.isPrincipiaFolderish:
00033         scope_obj = scope_obj.aq_inner.aq_parent
00034     path = '/'.join(scope_obj.getPhysicalPath())
00035     return path
00036 

Definition at line 80 of file test_scope.py.

00080 
00081 def test_suite():
00082     suite = unittest.TestSuite()
00083     suite.addTest(unittest.makeSuite(TestWickedScope))
00084     return suite