'Test volume extend with a thin-provisioned volume'

def test_extend_volume_thin(self):

    fake_volume = copy.deepcopy(get_fake_volume())
    volume = copy.deepcopy(eseries_fake.VOLUME)
    new_capacity = 10
    volume['objectType'] = 'thinVolume'
    self.library._client.expand_volume = mock.Mock(return_value=volume)
    self.library._get_volume_operation_progress = mock.Mock()
    self.library._get_volume = mock.Mock(return_value=volume)
    self.library.extend_volume(fake_volume, new_capacity)
    self.assertFalse(self.library._get_volume_operation_progress.called)
    self.library._client.expand_volume.assert_called_with(volume['id'], new_capacity, True)
