From 84d8cde6fea5cf3d54e5db8fa6d508d069eff8c8 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 23 Jan 2014 13:42:50 +0100 Subject: [FIX] test controller bzr revid: xmo@openerp.com-20140123124250-ek1g3a0ucuhtsgqv --- addons/web/controllers/testing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/web/controllers/testing.py') diff --git a/addons/web/controllers/testing.py b/addons/web/controllers/testing.py index 0160f0f28cd..598270cfe54 100644 --- a/addons/web/controllers/testing.py +++ b/addons/web/controllers/testing.py @@ -89,7 +89,7 @@ TESTING = Template(u""" class TestRunnerController(http.Controller): @http.route('/web/tests', type='http', auth="none") - def index(self, req, mod=None, **kwargs): + def index(self, mod=None, **kwargs): ms = module.get_modules() manifests = dict( (name, desc) @@ -114,7 +114,7 @@ class TestRunnerController(http.Controller): to_test = sorted_mods if mod != '*': if mod not in manifests: - return req.not_found(NOTFOUND.render(module=mod)) + return request.not_found(NOTFOUND.render(module=mod)) idx = sorted_mods.index(mod) to_test = [None] * len(sorted_mods) to_test[idx] = mod -- cgit v1.2.3 From 636b3ff2dd331b0c488c24f68ab266b7f4350c41 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 21 Feb 2014 10:55:43 +0100 Subject: [FIX] testing: only load js tests of loaded modules bzr revid: chs@openerp.com-20140221095543-07lv6as8ym17mj7z --- addons/web/controllers/testing.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'addons/web/controllers/testing.py') diff --git a/addons/web/controllers/testing.py b/addons/web/controllers/testing.py index 598270cfe54..f58482f7759 100644 --- a/addons/web/controllers/testing.py +++ b/addons/web/controllers/testing.py @@ -8,7 +8,7 @@ import operator import os from mako.template import Template -from openerp.modules import module +from openerp.modules import module, registry from openerp import http from openerp.http import request @@ -90,7 +90,11 @@ class TestRunnerController(http.Controller): @http.route('/web/tests', type='http', auth="none") def index(self, mod=None, **kwargs): - ms = module.get_modules() + source = kwargs.get('source') + if source: + ms = list(registry.RegistryManager.get(source)._init_modules) + else: + ms = module.get_modules() manifests = dict( (name, desc) for name, desc in zip(ms, map(self.load_manifest, ms)) -- cgit v1.2.3 From d27526d088653a5f9e892a1fe48829724274d8ee Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 21 Feb 2014 13:45:57 +0100 Subject: [IMP] JS unit tests split automated suite so web only runs its own JS tests, and web_tests_demo runs its own. Also reversed changes to index. todo: use hack cursor thing? bzr revid: xmo@openerp.com-20140221124557-s875nj0xrf2t85i9 --- addons/web/controllers/testing.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'addons/web/controllers/testing.py') diff --git a/addons/web/controllers/testing.py b/addons/web/controllers/testing.py index f58482f7759..598270cfe54 100644 --- a/addons/web/controllers/testing.py +++ b/addons/web/controllers/testing.py @@ -8,7 +8,7 @@ import operator import os from mako.template import Template -from openerp.modules import module, registry +from openerp.modules import module from openerp import http from openerp.http import request @@ -90,11 +90,7 @@ class TestRunnerController(http.Controller): @http.route('/web/tests', type='http', auth="none") def index(self, mod=None, **kwargs): - source = kwargs.get('source') - if source: - ms = list(registry.RegistryManager.get(source)._init_modules) - else: - ms = module.get_modules() + ms = module.get_modules() manifests = dict( (name, desc) for name, desc in zip(ms, map(self.load_manifest, ms)) -- cgit v1.2.3 From bb7eb5269917cfde51abb50a4dca175ddd371fb9 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 21 Feb 2014 15:35:18 +0100 Subject: [REM] RPC from js/qunit tests They're a pain in the ass, they never worked right and they're basically useless. Screw it. bzr revid: xmo@openerp.com-20140221143518-hv3rjkw2b00ughvh --- addons/web/controllers/testing.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'addons/web/controllers/testing.py') diff --git a/addons/web/controllers/testing.py b/addons/web/controllers/testing.py index 598270cfe54..c99efed4294 100644 --- a/addons/web/controllers/testing.py +++ b/addons/web/controllers/testing.py @@ -52,7 +52,6 @@ TESTING = Template(u"""