From 8e980efae3e2416082f10537c317e783e1e567e5 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Mon, 30 Oct 2017 15:40:42 -0700 Subject: [PATCH] Fix a unit test for cryptography 2.1 Cryptography 2.1 changed the way DNS names are handled. This patch fixes a unit test that assumed the names were lower case. Change-Id: Iaf97758004338aae7b0e3bf79784a82d2421b173 --- .../tests/unit/common/tls_utils/test_cert_parser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neutron_lbaas/tests/unit/common/tls_utils/test_cert_parser.py b/neutron_lbaas/tests/unit/common/tls_utils/test_cert_parser.py index 61484052e..82d248a26 100644 --- a/neutron_lbaas/tests/unit/common/tls_utils/test_cert_parser.py +++ b/neutron_lbaas/tests/unit/common/tls_utils/test_cert_parser.py @@ -240,10 +240,10 @@ class TestTLSParseUtils(base.BaseTestCase): def test_alt_subject_name_parses(self): hosts = cert_parser.get_host_names(ALT_EXT_CRT) self.assertEqual('www.cnfromsubject.org', hosts['cn']) - self.assertEqual('www.hostfromdnsname1.com', hosts['dns_names'][0]) - self.assertEqual('www.hostfromdnsname2.com', hosts['dns_names'][1]) - self.assertEqual('www.hostfromdnsname3.com', hosts['dns_names'][2]) - self.assertEqual('www.hostfromdnsname4.com', hosts['dns_names'][3]) + self.assertEqual('www.hostFromDNSName1.com', hosts['dns_names'][0]) + self.assertEqual('www.hostFromDNSName2.com', hosts['dns_names'][1]) + self.assertEqual('www.hostFromDNSName3.com', hosts['dns_names'][2]) + self.assertEqual('www.hostFromDNSName4.com', hosts['dns_names'][3]) def test_x509_parses(self): self.assertRaises(exceptions.UnreadableCert,