diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-06-29 09:19:52 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-06-29 14:58:04 +0200 |
| commit | 2846887ea80ad164fabb4b1e0742629330a527f5 (patch) | |
| tree | 2bedd05f3148a2ebf882c4b468828ca96ff19bc2 /addons/web/static/src/xml/base.xml | |
| parent | 514c8e5cd3adeed1427745a80ee6d368bda63692 (diff) | |
[FIX] web: mockServer and mockEnvironment
Fixes two issues in the test environment:
- for unset fields, the mockRead is supposed to return 0 (numerical
fields), empty array (x2many fields) or false (otherwise). Except
for the first case, it was returning undefined, and this might
cause crashes when evaluating contexts or domains.
- the mock environment allows overriding some global properties
like the session, for the test case only. Once the widget is
destroyed, those global properties are reset to their original
value. This wasn't working for models tests, because the destroy
function of the parent widget was never called. This could make
tests fail as they could have been impacted by other tests.
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
0 files changed, 0 insertions, 0 deletions
