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
def test_get_tls_version_upgrade(self): environment = {'COMPOSE_TLS_VERSION': 'TLSv1_2'} assert get_tls_version(environment) == ssl.PROTOCOL_TLSv1_2
def test_get_tls_version_default(self): environment = {} assert get_tls_version(environment) is None