Change the test with a last id different


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34555 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 140e18f8
...@@ -159,8 +159,8 @@ class TestIdTool(ERP5TypeTestCase): ...@@ -159,8 +159,8 @@ class TestIdTool(ERP5TypeTestCase):
# generate ids # generate ids
self.checkGenerateNewId('test_application_zodb') self.checkGenerateNewId('test_application_zodb')
# check zodb dict # check zodb dict
self.assertEqual(zodb_generator.last_id_dict['c02'], 1) self.assertEqual(zodb_generator.last_id_dict['c02'], 0)
self.assertEqual(zodb_generator.last_id_dict['d02'], 20) self.assertEqual(zodb_generator.last_id_dict['d02'], 21)
def checkGenerateNewIdWithSQL(self, store): def checkGenerateNewIdWithSQL(self, store):
""" """
...@@ -182,12 +182,12 @@ class TestIdTool(ERP5TypeTestCase): ...@@ -182,12 +182,12 @@ class TestIdTool(ERP5TypeTestCase):
# generate ids # generate ids
self.checkGenerateNewId('test_application_sql') self.checkGenerateNewId('test_application_sql')
# check last_id in sql # check last_id in sql
self.assertEquals(last_id_method(id_group='c02')[0]['LAST_INSERT_ID()'], 1) self.assertEquals(last_id_method(id_group='c02')[0]['LAST_INSERT_ID()'], 0)
self.assertEquals(last_id_method(id_group='d02')[0]['LAST_INSERT_ID()'], 20) self.assertEquals(last_id_method(id_group='d02')[0]['LAST_INSERT_ID()'], 21)
# check zodb dict # check zodb dict
if store: if store:
self.assertEqual(sql_generator.last_max_id_dict['c02'].value, 1) self.assertEqual(sql_generator.last_max_id_dict['c02'].value, 0)
self.assertEqual(sql_generator.last_max_id_dict['d02'].value, 20) self.assertEqual(sql_generator.last_max_id_dict['d02'].value, 21)
else: else:
self.assertEqual(getattr(sql_generator, 'last_max_id_dict', None), None) self.assertEqual(getattr(sql_generator, 'last_max_id_dict', None), 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