[FIX] sprurious error in log during javascript unit tests
authorXavier Morel <xmo@openerp.com>
Thu, 23 Jan 2014 11:54:13 +0000 (12:54 +0100)
committerXavier Morel <xmo@openerp.com>
Thu, 23 Jan 2014 11:54:13 +0000 (12:54 +0100)
commit5528b9b2d89c5f6a95b9d1a8f67cbe83c1643bed
tree0a10a63f1d8403de0a540bb285e1a4413ed237b6
parentd68bb48e442ff1ad9c98801ffc7518e3d9880d8f
[FIX] sprurious error in log during javascript unit tests

During some tests, the runner performs sequences of DUPLICATE and DROP
on databases. Each DUPLICATE is followed by some operations then a
DROP.

Problem is, after a DROP the next DUPLICATE RPC query will attempt a
connection to the just-dropped database, openerp.sql_db will log an
OperationalError ("Connection to the database failed" since the db it
tries to connect to was removed) then the HTTP dispatcher will just
switch to "nodb" and continue on its merry way.

Mute the sql_db logger while attempting to fetch the ir.http object.

Also assert that the logger name is a string in mute_logger, as
`mute_logger(openerp.sql_db)` is syntactically valid, but will not do
anything.

bzr revid: xmo@openerp.com-20140123115413-ax5patcomdfp3ue3
openerp/http.py
openerp/tools/misc.py