Commit 29e6e543 authored by Yusuke Muraoka's avatar Yusuke Muraoka

add a backward compatibility test

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35375 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 631dff69
...@@ -259,6 +259,18 @@ class TestIdTool(ERP5TypeTestCase): ...@@ -259,6 +259,18 @@ class TestIdTool(ERP5TypeTestCase):
id_generator='test_application_sql', id_generator='test_application_sql',
id_group='a04', id_count=3)) id_group='a04', id_count=3))
def test_05_backwardCompatibility(self):
"""
make keep API backward compatibility which are still described in the wiki.
"""
self.assertEquals(1, self.id_tool.generateNewId(id_group='test_05', default=1))
self.assertEquals(2, self.id_tool.generateNewId(id_group='test_05', default=1))
self.assertEquals(3, self.id_tool.generateNewId(id_group='test_05', default=1))
self.assertEquals(3, self.id_tool.getLastGeneratedId(id_group='test_05', default=1))
self.id_tool.setLastGeneratedId(10, id_group='test_05')
self.assertEquals(11, self.id_tool.generateNewId(id_group='test_05', default=1))
self.assertEquals(12, self.id_tool.generateNewId(id_group='test_05', default=1))
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestIdTool)) suite.addTest(unittest.makeSuite(TestIdTool))
......
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