'Ensure that logs don\'t end up under eventlet.
We still set the _should_emit return value directly to prevent
the situation where eventlet is removed from tests and this
preventing that.
NOTE(sdague): this test can be deleted when eventlet is no
longer supported for the wsgi stack in Nova.'

@mock.patch('nova.api.openstack.requestlog.RequestLog._should_emit')
def test_no_log_under_eventlet(self, emit):

    emit.return_value = False
    self.useFixture(fixtures.OutputStreamCapture())
    log = fixtures.StandardLogging()
    self.useFixture(log)
    self.useFixture(conf_fixture.ConfFixture())
    self.useFixture(fixtures.RPCFixture('nova.test'))
    api = self.useFixture(fixtures.OSAPIFixture()).api
    api.api_request('/', strip_version=True)
    self.assertNotIn('nova.api.openstack.requestlog', log.logger.output)
