def test_dd_list(self, check_output):
     """dd_list: returns a list of Driver objects parsed from output"""
     output = dd_list_output(fake_module) + dd_list_output(fake_enhancement)
     check_output.return_value = output
     anaconda, kernel = '19.0', os.uname()[2]
     result = dd_list(fake_module.repo)
     cmd = check_output.call_args[0][0]
     self.assertIn(kernel, cmd)
     self.assertIn(anaconda, cmd)
     self.assertIn(fake_module.repo, cmd)
     self.assertTrue(cmd[0].endswith("dd_list"))
     self.assertEqual(len(result), 2)
     mod, enh = sorted(result, key=lambda d: d.name)
     self.assertEqual(mod.__dict__, fake_module.__dict__)
     self.assertEqual(enh.__dict__, fake_enhancement.__dict__)
 def test_dd_list(self, check_output):
     """dd_list: returns a list of Driver objects parsed from output"""
     output = dd_list_output(fake_module)+dd_list_output(fake_enhancement)
     check_output.return_value = output
     anaconda, kernel = '19.0', os.uname()[2]
     result = dd_list(fake_module.repo)
     cmd = check_output.call_args[0][0]
     self.assertIn(kernel, cmd)
     self.assertIn(anaconda, cmd)
     self.assertIn(fake_module.repo, cmd)
     self.assertTrue(cmd[0].endswith("dd_list"))
     self.assertEqual(len(result), 2)
     mod, enh = sorted(result, key=lambda d: d.name)
     self.assertEqual(mod.__dict__, fake_module.__dict__)
     self.assertEqual(enh.__dict__, fake_enhancement.__dict__)
Exemple #3
0
 def test_dd_list(self, check_output):
     """dd_list: returns a list of Driver objects parsed from output"""
     output = dd_list_output(fake_module)+dd_list_output(fake_enhancement)
     check_output.return_value = output
     anaconda, kernel = '19.0', os.uname()[2]
     result = dd_list(fake_module.repo)
     cmd = check_output.call_args[0][0]
     assert kernel in cmd
     assert anaconda in cmd
     assert fake_module.repo in cmd
     assert cmd[0].endswith("dd_list")
     assert len(result) == 2
     mod, enh = sorted(result, key=lambda d: d.name)
     assert mod.__dict__ == fake_module.__dict__
     assert enh.__dict__ == fake_enhancement.__dict__