diff options
| author | Xavier Morel <xmo@openerp.com> | 2013-04-03 15:58:49 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2013-04-03 15:58:49 +0200 |
| commit | 3df2a146cdc87410ff271b663827aa2bacfe1f65 (patch) | |
| tree | a1af6949d1a136a846ae9585da33b0339887fbb6 /addons | |
| parent | ebc1cb227d36f2039d44d42ed539193029303f95 (diff) | |
[FIX] logging capture when testing embedded in server, handler hooks are more complex than through oe
bzr revid: xmo@openerp.com-20130403135849-ufnn2a1hdu938p7p
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/web/tests/test_dispatch.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web/tests/test_dispatch.py b/addons/web/tests/test_dispatch.py index ab2234e7d0d..b1304fca7f1 100644 --- a/addons/web/tests/test_dispatch.py +++ b/addons/web/tests/test_dispatch.py @@ -65,8 +65,8 @@ class TestHandler(logging.handlers.BufferingHandler): return False @contextlib.contextmanager -def capture_logging(level=logging.DEBUG): - logger = logging.getLogger('openerp.addons.web') +def capture_logging(logger, level=logging.DEBUG): + logger = logging.getLogger(logger) old_level = logger.level old_handlers = logger.handlers old_propagate = logger.propagate @@ -257,7 +257,7 @@ class TestSubclassing(DispatchCleanup): def speak(self): return 'Yu ordered cheezburgerz,' - with capture_logging() as handler: + with capture_logging('openerp.addons.web.http') as handler: class DogController(CatController): _cp_path = '/dog' |
