Technical mailing list archives

Re: Testing in Odoo v8

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

El may 10, 2015 5:42 PM, "Manuel Vázquez" <> 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

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:

 ` Try a search on the object service.
 Traceback (most recent call last):
 `   File "openerp/openerp/tests/", line 198, in setUp
 `     super(HttpCase, self).setUp()
 `   File "openerp/openerp/tests/", line 130, in setUp
 `     self.registry = RegistryManager.get(DB)
 `   File "openerp/openerp/modules/", line 339, in get
 `     update_module)
 `   File "openerp/openerp/modules/", line 356, in new
 `     registry = Registry(db_name)
 `   File "openerp/openerp/modules/", line 60, in __init__
 `     self._db = openerp.sql_db.db_connect(db_name)
 `   File "openerp/openerp/", line 619, in db_connect
 `     db, uri = dsn(to)
 `   File "openerp/openerp/", 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,

Post to: