def setUp(self): super(TestExtension, self).setUp() self.app.client_manager.identity = identity_fakes.FakeIdentityv2Client( endpoint=fakes.AUTH_URL, token=fakes.AUTH_TOKEN, ) self.identity_extensions_mock = ( self.app.client_manager.identity.extensions) self.identity_extensions_mock.reset_mock() self.app.client_manager.compute = compute_fakes.FakeComputev2Client( endpoint=fakes.AUTH_URL, token=fakes.AUTH_TOKEN, ) self.app.client_manager.volume = volume_fakes.FakeVolumeClient( endpoint=fakes.AUTH_URL, token=fakes.AUTH_TOKEN, ) network_client = network_fakes.FakeNetworkV2Client() self.app.client_manager.network = network_client self.network_extensions_mock = network_client.extensions self.network_extensions_mock.reset_mock()
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.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(TestAvailabilityZone, self).setUp() compute_client = compute_fakes.FakeComputev2Client( endpoint=fakes.AUTH_URL, token=fakes.AUTH_TOKEN, ) self.app.client_manager.compute = compute_client self.compute_azs_mock = compute_client.availability_zones self.compute_azs_mock.reset_mock() volume_client = volume_fakes.FakeVolumeClient( endpoint=fakes.AUTH_URL, token=fakes.AUTH_TOKEN, ) self.app.client_manager.volume = volume_client self.volume_azs_mock = volume_client.availability_zones self.volume_azs_mock.reset_mock() network_client = network_fakes.FakeNetworkV2Client( endpoint=fakes.AUTH_URL, token=fakes.AUTH_TOKEN, ) self.app.client_manager.network = network_client network_client.availability_zones = mock.Mock() network_client.find_extension = mock.Mock() self.network_azs_mock = network_client.availability_zones