Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: Testing in Odoo v8

by
Vauxoo S.A. de C.V., Moisés Augusto López Calderón
- 05/11/2015 10:28:46

Remove your second command:
openerp-server -d testdb_39 -i all --stop-after-init

Just use the third one:
openerp-server -d testdb_39 -i all --stop-after-init --test-enable
--log-level=test

El may 10, 2015 5:42 PM, "Manuel Vázquez" <manuel@merchise.org> escribió:
Hi all,

Is there's a change on how to test in Odoo v8?

When I run tests using the same procedure as I used before (in OpenERP
v7), which is roughly the following:

$ createdb testdb_39
$ openerp-server -d testdb_39 -i all --stop-after-init

$ openerp-server -d testdb_39 -i all --stop-after-init --test-enable
--log-level=test


I see many tests failing with the following error:

2015-05-10 13:41:28,894 23536 ERROR False
openerp.addons.base.tests.test_xmlrpc: ERROR:
test_xmlrpc_ir_model_search
(openerp.addons.base.tests.test_xmlrpc.test_xmlrpc)

 ` Try a search on the object service.
 Traceback (most recent call last):
 `   File "openerp/openerp/tests/common.py", line 198, in setUp
 `     super(HttpCase, self).setUp()
 `   File "openerp/openerp/tests/common.py", line 130, in setUp
 `     self.registry = RegistryManager.get(DB)
 `   File "openerp/openerp/modules/registry.py", line 339, in get
 `     update_module)
 `   File "openerp/openerp/modules/registry.py", line 356, in new
 `     registry = Registry(db_name)
 `   File "openerp/openerp/modules/registry.py", line 60, in __init__
 `     self._db = openerp.sql_db.db_connect(db_name)
 `   File "openerp/openerp/sql_db.py", line 619, in db_connect
 `     db, uri = dsn(to)
 `   File "openerp/openerp/sql_db.py", line 593, in dsn
 `     if db_or_uri.startswith(('postgresql://', 'postgres://')):
 ` AttributeError: 'bool' object has no attribute 'startswith'


Notice how the first log line says the db is False.  Why?  Is my
procedure faulty somehow?

Also my modules are not being tested.  Is "-i all" not supposed to
install all modules, including mine?

Best regards,
Manuel.

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe