def test_pci_filter_match_none(self): devs = inspector.pci_filter(self.devices, ['0234']) self.assertEqual(devs, [])
def test_pci_filter_match_two(self): devs = inspector.pci_filter(self.devices, ['02']) for dev in devs: print dev.get_pci_class() self.assertEqual(len(devs), 2)
def test_pci_filter_match_one(self): devs = inspector.pci_filter(self.devices, ['023']) self.assertEqual(len(devs), 1) self.assertEqual(devs[0].get_pci_class(), '0230')
def test_pci_filter_match_all(self): devs = inspector.pci_filter(self.devices, ['0']) self.assertEqual(len(devs), len(self.devices))
def test_pci_filter_match_two(self): devs = inspector.pci_filter(self.devices, ['02']) for dev in devs: print(dev.get_pci_class()) self.assertEqual(len(devs), 2)