[FIX] res_config tests: isinstance(x, long) is False when x is an int!

bzr revid: rco@openerp.com-20130508153207-0j8m0eiia2rvwmtf
This commit is contained in:
Raphael Collet 2013-05-08 17:32:07 +02:00
parent e6a0631977
commit ab6480dd0c
2 changed files with 2 additions and 2 deletions

View 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)

View 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)