Back to index

plone3  3.1.7
Classes | Functions | Variables
Archetypes.tests.test_rename Namespace Reference

Classes

class  Counter
class  RenameTests

Functions

def UID
def manage_afterAdd
def manage_beforeDelete
def manage_afterClone
def test_suite

Variables

tuple ADD_COUNTER = Counter()
tuple DELETE_COUNTER = Counter()
tuple CLONE_COUNTER = Counter()
int WARNING_LEVEL = 2
 DEBUG_CALL = False
tuple counts = (ADD_COUNTER, DELETE_COUNTER, CLONE_COUNTER)
dictionary meths

Function Documentation

def Archetypes.tests.test_rename.manage_afterAdd (   self,
  item,
  container 
)

Definition at line 74 of file test_rename.py.

00074 
00075 def manage_afterAdd(self, item, container):
00076     res = self.__test_manage_afterAdd__(item, container)
00077     uid = UID(self)
00078     ADD_COUNTER.add(uid)
00079     if DEBUG_CALL:
00080         warnings.warn("manage_afterAdd called: %s:%s" %
00081                       (uid, ADD_COUNTER.get(uid)),
00082                       UserWarning,
00083                       WARNING_LEVEL)
00084     return res

Here is the call graph for this function:

Definition at line 95 of file test_rename.py.

00095 
00096 def manage_afterClone(self, item):
00097     uid = UID(self)
00098     CLONE_COUNTER.add(uid)
00099     if DEBUG_CALL:
00100         warnings.warn("manage_afterClone called: %s:%s" %
00101                       (uid, CLONE_COUNTER.get(uid)),
00102                       UserWarning,
00103                       WARNING_LEVEL)
00104     return self.__test_manage_afterClone__(item)

Here is the call graph for this function:

def Archetypes.tests.test_rename.manage_beforeDelete (   self,
  item,
  container 
)

Definition at line 85 of file test_rename.py.

00085 
00086 def manage_beforeDelete(self, item, container):
00087     uid = UID(self)
00088     DELETE_COUNTER.add(uid)
00089     if DEBUG_CALL:
00090         warnings.warn("manage_beforeDelete called: %s:%s" %
00091                       (uid, DELETE_COUNTER.get(uid)),
00092                       UserWarning,
00093                       WARNING_LEVEL)
00094     return self.__test_manage_beforeDelete__(item, container)

Here is the call graph for this function:

Definition at line 205 of file test_rename.py.

00205 
00206 def test_suite():
00207     from unittest import TestSuite, makeSuite
00208     suite = TestSuite()
00209     suite.addTest(makeSuite(RenameTests))
00210     return suite

Definition at line 70 of file test_rename.py.

00070 
00071 def UID(obj):
00072     uid = shasattr(obj, UUID_ATTR) and obj.UID() or obj.absolute_url()
00073     return uid

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 63 of file test_rename.py.

Definition at line 65 of file test_rename.py.

Definition at line 105 of file test_rename.py.

Definition at line 68 of file test_rename.py.

Definition at line 64 of file test_rename.py.

Initial value:
00001 {'manage_afterAdd':manage_afterAdd,
00002          'manage_beforeDelete':manage_beforeDelete,
00003          'manage_afterClone':manage_afterClone
00004          }

Definition at line 106 of file test_rename.py.

Definition at line 67 of file test_rename.py.