Пример #1
0
 def test_get_tls_version_unavailable(self):
     environment = {'COMPOSE_TLS_VERSION': 'TLSv5_5'}
     with mock.patch('compose.cli.command.log') as mock_log:
         tls_version = get_tls_version(environment)
     mock_log.warn.assert_called_once_with(mock.ANY)
     assert tls_version is None
Пример #2
0
 def test_get_tls_version_upgrade(self):
     environment = {'COMPOSE_TLS_VERSION': 'TLSv1_2'}
     assert get_tls_version(environment) == ssl.PROTOCOL_TLSv1_2
Пример #3
0
 def test_get_tls_version_default(self):
     environment = {}
     assert get_tls_version(environment) is None
Пример #4
0
 def test_get_tls_version_unavailable(self):
     environment = {'COMPOSE_TLS_VERSION': 'TLSv5_5'}
     with mock.patch('compose.cli.command.log') as mock_log:
         tls_version = get_tls_version(environment)
     mock_log.warn.assert_called_once_with(mock.ANY)
     assert tls_version is None
Пример #5
0
 def test_get_tls_version_upgrade(self):
     environment = {'COMPOSE_TLS_VERSION': 'TLSv1_2'}
     assert get_tls_version(environment) == ssl.PROTOCOL_TLSv1_2
Пример #6
0
 def test_get_tls_version_default(self):
     environment = {}
     assert get_tls_version(environment) is None