assertItemsEqual with six.assertCountEqual
This commit is contained in:
Ayub khan
2019-08-21 16:26:12 +05:00
parent acf3cb684d
commit 8a95a8e520
43 changed files with 167 additions and 103 deletions

View File

@@ -11,6 +11,7 @@ import shutil
from tempfile import mkdtemp
from uuid import uuid4
import six
import unicodecsv
from celery.states import FAILURE, SUCCESS
from django.contrib.auth.models import User
@@ -369,8 +370,8 @@ class TestReportMixin(object):
self.assertEqual(csv_rows, expected_rows)
self.assertEqual(numeric_csv_rows, numeric_expected_rows)
else:
self.assertItemsEqual(csv_rows, expected_rows)
self.assertItemsEqual(numeric_csv_rows, numeric_expected_rows)
six.assertCountEqual(self, csv_rows, expected_rows)
six.assertCountEqual(self, numeric_csv_rows, numeric_expected_rows)
@staticmethod
def _extract_and_round_numeric_items(dictionary):