Example #1
0
def test_get_all_virtual_machines(vms):
    vm_names = [vm.name for vm in get_all_virtual_machines()]
    assert vms['unix'].name in vm_names
    assert vms['windows'].name in vm_names
Example #2
0
def test_get_all_virtual_machines(get_all_vcenter_objects, connection):
    obj1 = mock.MagicMock()
    obj2 = mock.MagicMock()
    get_all_vcenter_objects.return_value = [obj1, obj2]
    assert len(get_all_virtual_machines()) == 2
Example #3
0
def test_get_all_virtual_machines(vms):
    vms['unix'].create()
    assert len(get_all_virtual_machines()) >= 1