diff options
| author | Xavier-Do <xdo@odoo.com> | 2020-05-28 18:06:40 +0000 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2020-06-03 13:00:35 +0000 |
| commit | 1d0501d261bccaa2df1facdadfffe397225d30f8 (patch) | |
| tree | 0510bfdf42469281a7fb79779662ed355074b252 /odoo/addons/test_new_api/tests | |
| parent | 6afb4bb4e25cfb242ce16cd75a509b50a4b56e3f (diff) | |
[FIX] test_new_api, test_performance: lower query count
X-original-commit: 612b900fb99b26daba22eb25409f512a3a0cb2ea
Diffstat (limited to 'odoo/addons/test_new_api/tests')
| -rw-r--r-- | odoo/addons/test_new_api/tests/test_one2many.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/odoo/addons/test_new_api/tests/test_one2many.py b/odoo/addons/test_new_api/tests/test_one2many.py index 4c06c8a9049..a2be1d9709e 100644 --- a/odoo/addons/test_new_api/tests/test_one2many.py +++ b/odoo/addons/test_new_api/tests/test_one2many.py @@ -183,7 +183,7 @@ class One2manyCase(TransactionCase): with self.assertQueryCount(0): self.assertEqual(attachment.name, record0.display_name, "field should be computed") - with self.assertQueryCount(2): + with self.assertQueryCount(1): self.assertEqual(record0.attachment_ids, attachment, "inconsistent cache") # creating a host should not attempt to recompute attachment.name @@ -201,9 +201,9 @@ class One2manyCase(TransactionCase): with self.assertQueryCount(0): self.assertEqual(attachment.name, record1.display_name, "field should be recomputed") - with self.assertQueryCount(2): + with self.assertQueryCount(1): self.assertEqual(record1.attachment_ids, attachment, "inconsistent cache") - with self.assertQueryCount(2): + with self.assertQueryCount(1): self.assertFalse(record0.attachment_ids, "inconsistent cache") def test_recompute(self): |
