'Tests that creating a v3 client and requesting a microversion that
is either too new for the server (or client) to support raises an
exception.'

@mock.patch('cinderclient.client.get_volume_api_from_url', return_value='3')
@mock.patch('cinderclient.client.get_highest_client_server_version', return_value=2.0)
def test_create_v3_client_with_microversion_too_new(self, get_highest_version, get_volume_api):

    self.assertRaises(exception.CinderAPIVersionNotAvailable, cinder.cinderclient, self.ctxt, microversion='3.27')
    get_volume_api.assert_called_once_with(self.mock_session.get_endpoint.return_value)
    get_highest_version.assert_called_once_with(self.mock_session.get_endpoint.return_value)
