'Tests that cpu features are not retrieved when the host cpu model
is not in the capabilities.'

def test_get_capabilities_no_host_cpu_model(self):

    fake_caps_xml = '\n<capabilities>\n        <host>\n                <uuid>cef19ce0-0ca2-11df-855d-b19fbce37686</uuid>\n                <cpu>\n                        <arch>x86_64</arch>\n                        <vendor>Intel</vendor>\n                </cpu>\n        </host>\n</capabilities>'
    with mock.patch.object(fakelibvirt.virConnect, 'getCapabilities', return_value=fake_caps_xml):
        caps = self.host.get_capabilities()
        self.assertEqual(vconfig.LibvirtConfigCaps, type(caps))
        self.assertIsNone(caps.host.cpu.model)
        self.assertEqual(0, len(caps.host.cpu.features))
