diff options
| author | Xavier Morel <xmo@odoo.com> | 2017-05-17 10:10:51 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2017-06-26 16:45:02 +0200 |
| commit | 8f6e5dbdd378dccc6fcdb8e41d0cee3d9afc7941 (patch) | |
| tree | e0f1bff7242d54100ac3b675ed41e56d1b507d94 | |
| parent | 3c95f7f25c02e97cb3c3c966b3102368b9a6a474 (diff) | |
[FIX] P3: assertItemsEqual is called assertCountEqual
The python 3 name is more correct as to what the assertion actually
does, but still makes for a breaking change.
| -rw-r--r-- | odoo/tests/common.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/odoo/tests/common.py b/odoo/tests/common.py index 15d17dbf611..799863c76eb 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -23,6 +23,8 @@ from pprint import pformat import requests +from odoo.tools import pycompat + try: from itertools import zip_longest as izip_longest except ImportError: @@ -158,6 +160,10 @@ class BaseCase(TreeCase): doc = self._testMethodDoc return doc and ' '.join(l.strip() for l in doc.splitlines() if not l.isspace()) or None + if not pycompat.PY2: + # turns out this thing may not be quite as useful as we thought... + def assertItemsEqual(self, a, b, msg=None): + self.assertCountEqual(a, b, msg=None) class TransactionCase(BaseCase): """ TestCase in which each test method is run in its own transaction, |
