[Neo-report] r1959 gregory - /trunk/neo/tests/__init__.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 25 09:50:14 CET 2010


Author: gregory
Date: Thu Mar 25 09:50:10 2010
New Revision: 1959

Log:
Add helper getPTID to test framework.

Modified:
    trunk/neo/tests/__init__.py

Modified: trunk/neo/tests/__init__.py
==============================================================================
--- trunk/neo/tests/__init__.py [iso-8859-1] (original)
+++ trunk/neo/tests/__init__.py [iso-8859-1] Thu Mar 25 09:50:10 2010
@@ -131,6 +131,12 @@
             tid = pack('!LL', upper, lower)
         return tid
 
+    def getPTID(self, i=None):
+        """ Return a 8-bytes PTID """
+        if i is None:
+            return os.urandom(4)
+        return pack('!Q', i)
+
     def getOID(self, i=None):
         """ Return a 8-bytes OID """
         if i is None:





More information about the Neo-report mailing list