Remove usage of unittest2 on Python 3

It was needed to provide assertItemsEqual method. Starting with Python
3.2, there's assertCountEqual that does the same thing. Six provides a
helper that will dispatch to the existing method. With this change,
unittest 2 is only needed on Python 2.6 to backport the method.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2019-10-04 14:45:03 +02:00
parent 43fb06e00f
commit 2f54745715
32 changed files with 2682 additions and 1923 deletions

View file

@ -4,6 +4,7 @@ import os
import sys
import mock
import six
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
@ -66,7 +67,9 @@ class TestMaterializedPkgsetCreate(helpers.PungiTestCase):
self.compose, self.pkgset, self.prefix
)
self.assertItemsEqual(result.package_sets.keys(), ["global", "amd64", "x86_64"])
six.assertCountEqual(
self, result.package_sets.keys(), ["global", "amd64", "x86_64"]
)
self.assertEqual(result["global"], self.pkgset)
self.assertEqual(result["x86_64"], self.subsets["x86_64"])
self.assertEqual(result["amd64"], self.subsets["amd64"])