summaryrefslogtreecommitdiffstats
path: root/utils/test/test_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/test/test_utils.py')
-rw-r--r--utils/test/test_utils.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/test/test_utils.py b/utils/test/test_utils.py
index 2e59d86f2..b18f85692 100644
--- a/utils/test/test_utils.py
+++ b/utils/test/test_utils.py
@@ -2,6 +2,7 @@
Unittests for ooinstall utils.
"""
+import six
import unittest
import logging
import sys
@@ -28,9 +29,6 @@ class TestUtils(unittest.TestCase):
mock.call('OO_FOO: bar'),
]
- # python 2.x has assertItemsEqual, python 3.x has assertCountEqual
- if sys.version_info.major > 3:
- self.assertItemsEqual = self.assertCountEqual
######################################################################
# Validate ooinstall.utils.debug_env functionality
@@ -40,7 +38,7 @@ class TestUtils(unittest.TestCase):
with mock.patch('ooinstall.utils.installer_log') as _il:
debug_env(self.debug_all_params)
- print _il.debug.call_args_list
+ print(_il.debug.call_args_list)
# Debug was called for each item we expect
self.assertEqual(
@@ -48,7 +46,8 @@ class TestUtils(unittest.TestCase):
_il.debug.call_count)
# Each item we expect was logged
- self.assertItemsEqual(
+ six.assertCountEqual(
+ self,
self.expected,
_il.debug.call_args_list)
@@ -67,7 +66,8 @@ class TestUtils(unittest.TestCase):
_il.debug.call_count,
len(debug_some_params))
- self.assertItemsEqual(
+ six.assertCountEqual(
+ self,
self.expected,
_il.debug.call_args_list)