@mock.patch('see.context.resources.qemu.libvirt')
    @mock.patch('see.context.resources.qemu.domain_create')
    @mock.patch('see.context.resources.network.create')
    def test_initialize_network(self, network_mock, create_mock, libvirt_mock):
        network = mock.Mock()
        network.name.return_value = 'baz'
        network_mock.return_value = network
        resources = qemu.QEMUResources('foo', {'domain': 'bar', 'network': 'baz', 'disk': {'image': '/foo/bar'}})
        network_mock.assert_called_with(resources.hypervisor, 'foo', 'baz')
        create_mock.assert_called_with(resources.hypervisor, 'foo', 'bar', '/foo/bar', network_name='baz')
Resources initializer with network.
dataset/ETHPy150Open F-Secure/see/see/context/resources/test/qemu_test.py/ResourcesTest.test_initialize_network