From 8f6e5dbdd378dccc6fcdb8e41d0cee3d9afc7941 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 17 May 2017 10:10:51 +0200 Subject: [PATCH] [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. --- odoo/tests/common.py | 6 ++++++ 1 file changed, 6 insertions(+) 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,