aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/tests/test_objects.py
diff options
context:
space:
mode:
authorFrank A. Zdarsky <fzdarsky@redhat.com>2017-01-05 10:24:19 +0100
committerFrank A. Zdarsky <fzdarsky@redhat.com>2017-01-05 10:35:35 +0100
commit81d2a7d8715527ba5bb6c79cb7e4e379745c8feb (patch)
treecf27060188b3310b5d8e52a2987c0453a8ebafff /os_net_config/tests/test_objects.py
parentd929214c7a904da57a406dd56ac06f001fdc7d7b (diff)
Make os-net-config pass tox py3 tests
This patch improves Python 3 compatibility by replacing .iteritems() with .items() for iterating over dicts and fixing two tests to use portable string comparison. Change-Id: I8e1acafe372f1696823561d6aa8aae5437d34025 Closes-Bug: #1654187
Diffstat (limited to 'os_net_config/tests/test_objects.py')
-rw-r--r--os_net_config/tests/test_objects.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/os_net_config/tests/test_objects.py b/os_net_config/tests/test_objects.py
index 23a3bbe..54d153c 100644
--- a/os_net_config/tests/test_objects.py
+++ b/os_net_config/tests/test_objects.py
@@ -428,7 +428,7 @@ class TestIvsInterface(base.TestCase):
objects.IvsBridge.from_json,
json.loads(data))
expected = 'IVS does not support bond interfaces.'
- self.assertIn(expected, err)
+ self.assertIn(expected, six.text_type(err))
class TestNfvswitchBridge(base.TestCase):
@@ -493,7 +493,7 @@ class TestNfvswitchInterface(base.TestCase):
objects.NfvswitchBridge.from_json,
json.loads(data))
expected = 'NFVSwitch does not support bond interfaces.'
- self.assertIn(expected, err)
+ self.assertIn(expected, six.text_type(err))
class TestBond(base.TestCase):