'Test weigher with a PCI device instance and a multiplier.
Ensure that the host with the smallest number of free PCI devices
capable of meeting the requirements of the instance is chosen,
enforcing a stacking (rather than spreading) behavior.'

def test_multiplier_with_pci(self):

    hosts = [('host1', 'node1', [4, 1]), ('host2', 'node2', [10]), ('host3', 'node3', [1, 1, 1, 1])]
    hostinfo_list = self._get_all_hosts(hosts)
    request = objects.InstancePCIRequest(count=4, spec=[{'vendor_id': '8086'}])
    requests = objects.InstancePCIRequests(requests=[request])
    spec_obj = objects.RequestSpec(pci_requests=requests)
    weighed_host = self._get_weighed_hosts(hostinfo_list, spec_obj)[0]
    self.assertEqual(1.0, weighed_host.weight)
    self.assertEqual('host3', weighed_host.obj.host)
