diff --git a/openerp/tests/__init__.py b/openerp/tests/__init__.py index 4b8fa798aea..927a375df64 100644 --- a/openerp/tests/__init__.py +++ b/openerp/tests/__init__.py @@ -9,7 +9,7 @@ See the :ref:`test-framework` section in the :ref:`features` list. """ from . import test_expression, test_ir_sequence, test_orm,\ - test_uninstall, test_export, test_import + test_uninstall fast_suite = [ test_ir_sequence, @@ -18,8 +18,6 @@ fast_suite = [ checks = [ test_expression, test_orm, - test_export, - test_import, ] # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tests/addons/test_impex/__init__.py b/openerp/tests/addons/test_impex/__init__.py new file mode 100644 index 00000000000..bff786c0885 --- /dev/null +++ b/openerp/tests/addons/test_impex/__init__.py @@ -0,0 +1 @@ +import models diff --git a/openerp/tests/addons/test_impex/__openerp__.py b/openerp/tests/addons/test_impex/__openerp__.py new file mode 100644 index 00000000000..f3b5511dc30 --- /dev/null +++ b/openerp/tests/addons/test_impex/__openerp__.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +{ + 'name': 'test-import-export', + 'version': '0.1', + 'category': 'Tests', + 'description': """A module to test import/export.""", + 'author': 'OpenERP SA', + 'maintainer': 'OpenERP SA', + 'website': 'http://www.openerp.com', + 'depends': ['base'], + 'data': [], + 'installable': True, + 'auto_install': False, +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tests/export_models.py b/openerp/tests/addons/test_impex/models.py similarity index 96% rename from openerp/tests/export_models.py rename to openerp/tests/addons/test_impex/models.py index 3bb5cf0c6d2..455ea6b22f4 100644 --- a/openerp/tests/export_models.py +++ b/openerp/tests/addons/test_impex/models.py @@ -34,7 +34,6 @@ models = [ for name, field in models: attrs = { '_name': 'export.%s' % name, - '_module': 'base', '_columns': { 'const': fields.integer(), 'value': field @@ -57,7 +56,6 @@ for name, field in models: class One2ManyChild(orm.Model): _name = 'export.one2many.child' - _module = 'base' # FIXME: orm.py:1161, fix to name_get on m2o field _rec_name = 'value' @@ -72,7 +70,6 @@ class One2ManyChild(orm.Model): class One2ManyMultiple(orm.Model): _name = 'export.one2many.multiple' - _module = 'base' _columns = { 'const': fields.integer(), @@ -83,7 +80,6 @@ class One2ManyMultiple(orm.Model): class One2ManyChildMultiple(orm.Model): _name = 'export.one2many.multiple.child' - _module = 'base' # FIXME: orm.py:1161, fix to name_get on m2o field _rec_name = 'value' @@ -97,16 +93,13 @@ class One2ManyChildMultiple(orm.Model): for record in self.browse(cr, uid, ids, context=context)] class One2ManyChild1(orm.Model): _name = 'export.one2many.child.1' - _module = 'base' _inherit = 'export.one2many.multiple.child' class One2ManyChild2(orm.Model): _name = 'export.one2many.child.2' - _module = 'base' _inherit = 'export.one2many.multiple.child' class Many2ManyChild(orm.Model): _name = 'export.many2many.other' - _module = 'base' # FIXME: orm.py:1161, fix to name_get on m2o field _rec_name = 'value' diff --git a/openerp/tests/addons/test_impex/tests/__init__.py b/openerp/tests/addons/test_impex/tests/__init__.py new file mode 100644 index 00000000000..d6af53cba1b --- /dev/null +++ b/openerp/tests/addons/test_impex/tests/__init__.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +from . import test_export, test_import + +fast_suite = [ +] + +checks = [ + test_export, + test_import, +] + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tests/test_export.py b/openerp/tests/addons/test_impex/tests/test_export.py similarity index 99% rename from openerp/tests/test_export.py rename to openerp/tests/addons/test_impex/tests/test_export.py index b8e33b418a6..812a84b3a21 100644 --- a/openerp/tests/test_export.py +++ b/openerp/tests/addons/test_impex/tests/test_export.py @@ -3,13 +3,11 @@ import itertools import openerp.modules.registry import openerp -from . import common, export_models +from openerp.tests import common def setUpModule(): openerp.tools.config['update'] = {'base': 1} - openerp.modules.registry.RegistryManager.new( - common.DB, update_module=True) class CreatorCase(common.TransactionCase): model_name = False diff --git a/openerp/tests/test_import.py b/openerp/tests/addons/test_impex/tests/test_import.py similarity index 99% rename from openerp/tests/test_import.py rename to openerp/tests/addons/test_impex/tests/test_import.py index de2553427e0..9999a9c6e5d 100644 --- a/openerp/tests/test_import.py +++ b/openerp/tests/addons/test_impex/tests/test_import.py @@ -2,7 +2,7 @@ import openerp.modules.registry import openerp -from . import common, export_models +from openerp.tests import common def ok(n): """ Successful import of ``n`` records @@ -28,8 +28,6 @@ def values(seq, field='value'): def setupModule(): openerp.tools.config['update'] = {'base': 1} - openerp.modules.registry.RegistryManager.new( - common.DB, update_module=True) class ImporterCase(common.TransactionCase): model_name = False