Created
October 7, 2014 19:11
-
-
Save nelsnelson/c394c0aeab8e9c039e94 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7811 def test_resume(self, mock_get_existing_domain_xml, | |
7812 mock_create_domain_and_network, mock_attach_pci_devices, | |
7813 mock_get_instance_pci_devs): | |
7814 dummyxml = ("<domain type='kvm'><name>instance-0000000a</name>" | |
7815 "<devices>" | |
7816 "<disk type='file'><driver name='qemu' type='raw'/>" | |
7817 "<source file='/test/disk'/>" | |
7818 "<target dev='vda' bus='virtio'/></disk>" | |
7819 "<disk type='file'><driver name='qemu' type='qcow2'/>" | |
7820 "<source file='/test/disk.local'/>" | |
7821 "<target dev='vdb' bus='virtio'/></disk>" | |
7822 "</devices></domain>") | |
7823 <<<<<<< HEAD | |
7824 instance = objects.Instance(**self.test_instance) | |
7825 network_info = _fake_network_info(self.stubs, 1) | |
7826 block_device_info = None | |
7827 ======= | |
7828 mock_get_existing_domain_xml.return_value = dummyxml | |
7829 | |
7830 mock_dom = mock.MagicMock() | |
7831 mock_create_domain_and_network.return_value = mock_dom | |
7832 | |
7833 mock_get_instance_pci_devs.return_value = mock.sentinel.pci_devs | |
7834 | |
7835 instance = db.instance_create(self.context, self.test_instance) | |
7836 mock_network_info = mock.MagicMock() | |
7837 mock_block_device_info = mock.MagicMock() | |
7838 | |
7839 >>>>>>> b45f5dd... Refactoring some libvirt tests to use mock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment