Example #1
0
 def test_pci_filter_match_none(self):
     devs = inspector.pci_filter(self.devices, ['0234'])
     self.assertEqual(devs, [])
Example #2
0
 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)
Example #3
0
 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')
Example #4
0
 def test_pci_filter_match_all(self):
     devs = inspector.pci_filter(self.devices, ['0'])
     self.assertEqual(len(devs), len(self.devices))
Example #5
0
 def test_pci_filter_match_none(self):
     devs = inspector.pci_filter(self.devices, ['0234'])
     self.assertEqual(devs, [])
Example #6
0
 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')
Example #7
0
 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)
Example #8
0
 def test_pci_filter_match_all(self):
     devs = inspector.pci_filter(self.devices, ['0'])
     self.assertEqual(len(devs), len(self.devices))