Commit 3f9588e6 authored by Jérome Perrin's avatar Jérome Perrin

remove generateNewLongId, use generateNewId instead

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24457 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 06d8c679
No related merge requests found
...@@ -126,15 +126,6 @@ class IdTool(BaseTool): ...@@ -126,15 +126,6 @@ class IdTool(BaseTool):
return new_id return new_id
security.declareProtected(Permissions.AccessContentsInformation,
'generateNewLongId')
def generateNewLongId(self, **kw):
"""
Returns a random 64bits long.
It's a 64bits number, so it can look ugly and/or huge to users.
"""
return random.getrandbits(64)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getDictLengthIdsItems') 'getDictLengthIdsItems')
def getDictLengthIdsItems(self): def getDictLengthIdsItems(self):
......
...@@ -119,10 +119,6 @@ class TestIdTool(ERP5TypeTestCase): ...@@ -119,10 +119,6 @@ class TestIdTool(ERP5TypeTestCase):
default='A', default='A',
method=generateTestNumber)) method=generateTestNumber))
def test_generateNewLongId(self):
idtool = self.portal.portal_ids
new_id = idtool.generateNewLongId()
self.assertTrue(isinstance(new_id, long))
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
......
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