diff options
| author | Fabien Meghazi <fme@openerp.com> | 2014-04-25 11:03:58 +0200 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2014-04-25 11:03:58 +0200 |
| commit | bc4620d2c6108745550e58cdac7eab1b07805079 (patch) | |
| tree | 934ec29a3fb1bb8b6769087a7df0731306f31768 /addons/web/controllers/testing.py | |
| parent | 403e991b2ea62fb0abd8c3dd8c7796b1099fcdd7 (diff) | |
[FIX] Still trying to fix tests
bzr revid: fme@openerp.com-20140425090358-1ydohuemx1tk715u
Diffstat (limited to 'addons/web/controllers/testing.py')
| -rw-r--r-- | addons/web/controllers/testing.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/addons/web/controllers/testing.py b/addons/web/controllers/testing.py index 932da58fa07..63eac97f9e0 100644 --- a/addons/web/controllers/testing.py +++ b/addons/web/controllers/testing.py @@ -61,8 +61,8 @@ TESTING = Template(u"""<!DOCTYPE html> <div id="qunit"></div> <div id="qunit-fixture"></div> </body> -<!-- TODO xmo please use the regular template even for testing --> -<script src="/web/js/web.assets_backend"></script> +<!-- TODO fme: Remove manifest usage for js and css --> +${bundle('web.assets_backend') | n} % for module, jss, tests, templates in files: % for js in jss: % if not js.endswith('/apps.js'): @@ -134,10 +134,16 @@ class TestRunnerController(http.Controller): for mod, tests in itertools.izip(sorted_mods, tests) ] - return TESTING.render(files=files, dependencies=json.dumps( + def bundle(xmlid): + return request.render(xmlid, lazy=False) + + return TESTING.render(bundle=bundle, files=files, dependencies=json.dumps( [name for name in sorted_mods if module.get_module_resource(name, 'static') - if manifests[name]['js']])) + # TODO fme: find a way to detect modules with js bundles + # if manifests[name]['js'] + ])) + def load_manifest(self, name): manifest = module.load_information_from_description_file(name) |
