diff --git a/nova/tests/fixtures.py b/nova/tests/fixtures.py index a922aa7dc..35c469212 100644 --- a/nova/tests/fixtures.py +++ b/nova/tests/fixtures.py @@ -341,11 +341,11 @@ class OSAPIFixture(fixtures.Fixture): 'debug': True } self.useFixture(ConfPatcher(**conf_overrides)) - osapi = service.WSGIService("osapi_compute") - osapi.start() - self.addCleanup(osapi.stop) + self.osapi = service.WSGIService("osapi_compute") + self.osapi.start() + self.addCleanup(self.osapi.stop) self.auth_url = 'http://%(host)s:%(port)s/%(api_version)s' % ({ - 'host': osapi.host, 'port': osapi.port, + 'host': self.osapi.host, 'port': self.osapi.port, 'api_version': self.api_version}) self.api = client.TestOpenStackClient('fake', 'fake', self.auth_url) self.admin_api = client.TestOpenStackClient(