summaryrefslogtreecommitdiffstats
path: root/utils/test/test_utils.py
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-12-21 13:06:27 -0500
committerGitHub <noreply@github.com>2016-12-21 13:06:27 -0500
commit4c20c6b76f295dc83e2ce730238b7753724e7e53 (patch)
tree4e6ff6855c6e5343e97d0864f47cb2088fe364f9 /utils/test/test_utils.py
parent3e5f3380ccacc654450924fca830b93fda6c7592 (diff)
parent7d02b608de839cb57e2071e9d55052957c13aae3 (diff)
downloadopenshift-4c20c6b76f295dc83e2ce730238b7753724e7e53.tar.gz
openshift-4c20c6b76f295dc83e2ce730238b7753724e7e53.tar.bz2
openshift-4c20c6b76f295dc83e2ce730238b7753724e7e53.tar.xz
openshift-4c20c6b76f295dc83e2ce730238b7753724e7e53.zip
Merge pull request #3001 from detiber/python3
python3 support, add tox for better local testing against multiple python versions
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)