'The details of ``novaclient.exceptions.ClientException`` are logged
when it is raised by the decorated method and the exception is still
raised.'

@capture_logging((lambda self, logger: None))
def test_novaclient_exception(self, logger):

    result = NovaClientException(code=INTERNAL_SERVER_ERROR, message='Some    things    went    wrong    with    some    other    things.', details={'key': 'value'}, request_id='abcdefghijklmnopqrstuvwxyz', url='/foo/bar', method='POST')
    logging_dummy = LoggingDummy(Dummy(result))
    self.assertRaises(NovaClientException, logging_dummy.raise_method)
    logged = LoggedMessage.of_type(logger.messages, NOVA_CLIENT_EXCEPTION)[0]
    assertContainsFields(self, logged.message, {u'code': result.code, u'message': result.message, u'details': result.details, u'request_id': result.request_id, u'url': result.url, u'method': result.method})
