diff options
| author | Raphael Collet <rco@odoo.com> | 2018-02-06 13:42:40 +0100 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2018-02-12 10:31:59 +0100 |
| commit | 7ea4f13f16671b4361a42d668fb81c941a552468 (patch) | |
| tree | 6c4049fb6ae0fa3044bb5f0ebf994b0e98aea1b2 /odoo/addons/test_assetsbundle | |
| parent | 459a53ddb5b64eb689a4546ed95cbbae9e802a92 (diff) | |
[REF] tests: `TestCursor` is now a proxy to a real `Cursor`
This allows rpc requests in `HttpCase` to use the cursor `self.cr`, which is
now shared between the Python test and the rpc requests. This simplifies code
to prepare a JS test, and code to check the result of a JS tour.
Fixes #12237
Diffstat (limited to 'odoo/addons/test_assetsbundle')
| -rw-r--r-- | odoo/addons/test_assetsbundle/tests/test_assetsbundle.py | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/odoo/addons/test_assetsbundle/tests/test_assetsbundle.py b/odoo/addons/test_assetsbundle/tests/test_assetsbundle.py index c97ac8d0f95..3d372a6dcd2 100644 --- a/odoo/addons/test_assetsbundle/tests/test_assetsbundle.py +++ b/odoo/addons/test_assetsbundle/tests/test_assetsbundle.py @@ -332,22 +332,21 @@ class TestAssetsBundleInBrowser(HttpCase): def test_02_js_interpretation_inline(self): """ Checks that the javascript of a bundle is correctly interpretet when mixed with inline. """ - with self.registry.cursor() as test_cursor: - view_arch = """ - <data> - <xpath expr="." position="inside"> - <script type="text/javascript"> - var d = 4; - </script> - </xpath> - </data> - """ - self.env(cr=test_cursor)['ir.ui.view'].create({ - 'name': 'test bundle inheritance inline js', - 'type': 'qweb', - 'arch': view_arch, - 'inherit_id': self.browse_ref('test_assetsbundle.bundle1').id, - }) + view_arch = """ + <data> + <xpath expr="." position="inside"> + <script type="text/javascript"> + var d = 4; + </script> + </xpath> + </data> + """ + self.env['ir.ui.view'].create({ + 'name': 'test bundle inheritance inline js', + 'type': 'qweb', + 'arch': view_arch, + 'inherit_id': self.browse_ref('test_assetsbundle.bundle1').id, + }) self.phantom_js( "/test_assetsbundle/js", |
