summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy McCrory <jimmy.mccrory@gmail.com>2017-09-21 20:20:32 -0700
committerJimmy McCrory <jimmy.mccrory@gmail.com>2017-09-21 20:22:07 -0700
commit86ac4f82ce7b01d2d841e633f99ff6599df54d06 (patch)
tree56f5206abba103fe40d57576d295a1d862ba895a
parent0b430ef949ff6396951b2807a3b211cee7ee2606 (diff)
Check for SSL function directly
Instead of looking at Python major and micro versions, check for the required ssl.create_default_context function directly. Change-Id: I6ef528a79d8ff6ff649e8f66f2d11d418e87d9d7
Notes
Notes (review): Code-Review+2: David Lyle <dklyle0@gmail.com> Workflow+1: David Lyle <dklyle0@gmail.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 06 Oct 2017 18:17:59 +0000 Reviewed-on: https://review.openstack.org/506496 Project: openstack/tempest-horizon Branch: refs/heads/master
-rw-r--r--tempest_horizon/tests/scenario/test_dashboard_basic_ops.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tempest_horizon/tests/scenario/test_dashboard_basic_ops.py b/tempest_horizon/tests/scenario/test_dashboard_basic_ops.py
index a7cd4dd..cd4af56 100644
--- a/tempest_horizon/tests/scenario/test_dashboard_basic_ops.py
+++ b/tempest_horizon/tests/scenario/test_dashboard_basic_ops.py
@@ -21,7 +21,6 @@ from tempest.lib import decorators
21from tempest import test 21from tempest import test
22 22
23import ssl 23import ssl
24import sys
25 24
26CONF = config.CONF 25CONF = config.CONF
27 26
@@ -132,8 +131,7 @@ class TestDashboardBasicOps(test.BaseTestCase):
132 return self.opener 131 return self.opener
133 132
134 def _ssl_default_context_supported(self): 133 def _ssl_default_context_supported(self):
135 return ((sys.version_info[0] == 2 and sys.version_info[2] >= 9) or 134 return (hasattr(ssl, 'create_default_context'))
136 (sys.version_info[0] == 3))
137 135
138 @decorators.idempotent_id('4f8851b1-0e69-482b-b63b-84c6e76f6c80') 136 @decorators.idempotent_id('4f8851b1-0e69-482b-b63b-84c6e76f6c80')
139 def test_basic_scenario(self): 137 def test_basic_scenario(self):