diff options
| author | Martin Trigaux <mat@odoo.com> | 2019-07-04 12:28:38 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2019-07-04 13:33:37 +0000 |
| commit | 2be2f64aeb33e29821d53baa0b540dc9474b9cdd (patch) | |
| tree | 11f66fb30e63a001115e802ff8e5d7f6a863e0d5 /addons/web/static/src/js/views/basic | |
| parent | 3b1d00acda935810826e476ad49a48bf5947c0ab (diff) | |
[FIX] tests: properly log errors
If a test is failing with assertRecordValues, the comparison and the error
logging were not computed the same way.
The _compare_candidate was accessing the record via
record[field_name]
which uses the cache
While the _format_message was doing
records.read(...)
which queries directly the database.
If the test was failing (correctly) because of a wrong cache invalidation
(e.g. update the value directly in SQL without invalidating the cache),
the error message would look like:
AssertionError: Record doesn't match expected values at index 0.
Current values:
{'id': 42, 'name': 'Foo'}
Expected values:
{'name': 'Foo'}
closes odoo/odoo#34589
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic')
0 files changed, 0 insertions, 0 deletions
