

@mock.patch('see.context.resources.qemu.libvirt')
@mock.patch('see.context.resources.qemu.domain_create')
def test_initialize_hypervisor(self, create_mock, libvirt_mock):
    'Resources initializer with hypervisor.'
    resources = qemu.QEMUResources('foo', {
        'domain': 'bar',
        'hypervisor': 'baz',
        'disk': {
            'image': '/foo/bar',
        },
    })
    libvirt_mock.open.assert_called_with('baz')
    create_mock.assert_called_with(resources.hypervisor, 'foo', 'bar', '/foo/bar', network_name=None)

dataset/ETHPy150Open F-Secure/see/see/context/resources/test/qemu_test.py ResourcesTest.test_initialize_hypervisor/original