[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.
This commit is contained in:
Xavier Morel
2017-06-26 16:45:02 +02:00
parent 3c95f7f25c
commit 8f6e5dbdd3
+6
View File
@@ -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,