From 4c05cb0913df85a50808f34d1cc2aea57de4ffbc Mon Sep 17 00:00:00 2001 From: "ChangBo Guo(gcb)" Date: Tue, 20 Dec 2016 10:49:58 +0800 Subject: [PATCH] Skip network.test_manager.LdapDNSTestCase on Python 3 ldapdns module is used for nova-network which was depecated, and Python-ldap sometimes behaves poorly when receiving unicode strings, so we can just skip tests if using Python3. Partially-Implements: blueprint goal-python35 Change-Id: I9fa0b6b0d397318b52f0fe3784d6e7047aefaab2 --- nova/tests/unit/network/test_manager.py | 1 + tests-py3.txt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/tests/unit/network/test_manager.py b/nova/tests/unit/network/test_manager.py index 8cea2abf4fe2..bd6070dc2bb3 100644 --- a/nova/tests/unit/network/test_manager.py +++ b/nova/tests/unit/network/test_manager.py @@ -3439,6 +3439,7 @@ domain1 = "example.org" domain2 = "example.com" +@testtools.skipIf(six.PY3, 'python-ldap is not compatible for Python 3.') class LdapDNSTestCase(test.NoDBTestCase): """Tests nova.network.ldapdns.LdapDNS.""" def setUp(self): diff --git a/tests-py3.txt b/tests-py3.txt index 72d2bf477e99..ac996a1ec3c4 100644 --- a/tests-py3.txt +++ b/tests-py3.txt @@ -10,7 +10,6 @@ nova.tests.unit.compute.test_compute.ComputeAPITestCase.test_create_with_base64_ nova.tests.unit.compute.test_compute_cells.CellsComputeAPITestCase.test_create_with_base64_user_data nova.tests.unit.compute.test_compute_mgr.ComputeManagerUnitTestCase.test_run_pending_deletes nova.tests.unit.compute.test_host_api.ComputeHostAPICellsTestCase -nova.tests.unit.network.test_manager.LdapDNSTestCase nova.tests.unit.test_matchers.TestDictMatches.test__str__ nova.tests.unit.test_wsgi.TestWSGIServerWithSSL nova.tests.unit.virt.libvirt.storage.test_rbd.RbdTestCase