Commit 026102a0 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Use random.randint instead of os.urandom

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2313 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent bff23e30
......@@ -16,6 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import random
import unittest
import tempfile
import MySQLdb
......@@ -134,7 +135,7 @@ class NeoTestBase(unittest.TestCase):
def getPTID(self, i=None):
""" Return an integer PTID """
if i is None:
return os.unpack('!Q', os.urandom(8))[0]
return random.randint(1, 2**64)
return i
def getOID(self, i=None):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment