def setUp(self): super(TestComputev2, self).setUp() self.app.client_manager.compute = FakeComputev2Client( endpoint=fakes.AUTH_URL, token=fakes.AUTH_TOKEN, ) self.app.client_manager.compute.api = compute_v2.APIv2( session=self.app.client_manager.session, endpoint=fakes.AUTH_URL, ) self.app.client_manager.identity = identity_fakes.FakeIdentityv2Client( endpoint=fakes.AUTH_URL, token=fakes.AUTH_TOKEN, ) self.app.client_manager.image = image_fakes.FakeImagev2Client( endpoint=fakes.AUTH_URL, token=fakes.AUTH_TOKEN, ) self.app.client_manager.network = network_fakes.FakeNetworkV2Client( endpoint=fakes.AUTH_URL, token=fakes.AUTH_TOKEN, ) self.app.client_manager.volume = volume_fakes.FakeVolumeClient( endpoint=fakes.AUTH_URL, token=fakes.AUTH_TOKEN, )
def setUp(self): super(TestComputeAPIv2, self).setUp() sess = session.Session() self.api = compute.APIv2(session=sess, endpoint=FAKE_URL) self.requests_mock = self.useFixture(fixture.Fixture())