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
This commit is contained in:
parent
0b430ef949
commit
86ac4f82ce
|
@ -21,7 +21,6 @@ from tempest.lib import decorators
|
|||
from tempest import test
|
||||
|
||||
import ssl
|
||||
import sys
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
@ -132,8 +131,7 @@ class TestDashboardBasicOps(test.BaseTestCase):
|
|||
return self.opener
|
||||
|
||||
def _ssl_default_context_supported(self):
|
||||
return ((sys.version_info[0] == 2 and sys.version_info[2] >= 9) or
|
||||
(sys.version_info[0] == 3))
|
||||
return (hasattr(ssl, 'create_default_context'))
|
||||
|
||||
@decorators.idempotent_id('4f8851b1-0e69-482b-b63b-84c6e76f6c80')
|
||||
def test_basic_scenario(self):
|
||||
|
|
Loading…
Reference in New Issue