[FIX] res_config tests: isinstance(x, long) is False when x is an int!
authorRaphael Collet <rco@openerp.com>
Wed, 8 May 2013 15:32:07 +0000 (17:32 +0200)
committerRaphael Collet <rco@openerp.com>
Wed, 8 May 2013 15:32:07 +0000 (17:32 +0200)
bzr revid: rco@openerp.com-20130508153207-0j8m0eiia2rvwmtf

openerp/addons/base/res/res_config.py
openerp/addons/base/tests/test_res_config.py

index 1732acf..00fb87d 100644 (file)
@@ -623,7 +623,7 @@ class res_config_settings(osv.osv_memory, res_config_module_installation_mixin):
             structured as follows: module_name.menuitem_xml_id (e.g.: "base.menu_sale_config")
         :return tuple:
             - t[0]: string: full path to the menuitem (e.g.: "Settings/Configuration/Sales")
-            - t[1]: long: id of the menuitem's action
+            - t[1]: int or long: id of the menuitem's action
         """
         module_name, menu_xml_id = menu_xml_id.split('.')
         dummy, menu_id = self.pool['ir.model.data'].get_object_reference(cr, uid, module_name, menu_xml_id)
index bab5feb..450925a 100644 (file)
@@ -42,7 +42,7 @@ class test_res_config(common.TransactionCase):
         self.assertIsInstance(res, tuple)
         self.assertEqual(len(res), 2, "The result should contain 2 elements")
         self.assertIsInstance(res[0], basestring)
-        self.assertIsInstance(res[1], long)
+        self.assertIsInstance(res[1], (int, long))
 
         # Check returned values
         self.assertEqual(res[0], self.expected_path)