'Test volumeops.extend_virtual_disk.'

def test_extend_virtual_disk(self):

    task = mock.sentinel.task
    invoke_api = self.session.invoke_api
    invoke_api.return_value = task
    disk_mgr = self.session.vim.service_content.virtualDiskManager
    fake_size = 5
    fake_size_in_kb = (fake_size * units.Mi)
    fake_name = 'fake_volume_0000000001'
    fake_dc = mock.sentinel.datacenter
    self.vops.extend_virtual_disk(fake_size, fake_name, fake_dc)
    invoke_api.assert_called_once_with(self.session.vim, 'ExtendVirtualDisk_Task', disk_mgr, name=fake_name, datacenter=fake_dc, newCapacityKb=fake_size_in_kb, eagerZero=False)
    self.session.wait_for_task.assert_called_once_with(task)
