diff --git a/test/test_detail.py b/test/test_detail.py index 790fb63..45e8a1c 100644 --- a/test/test_detail.py +++ b/test/test_detail.py @@ -10,28 +10,26 @@ logger = get_logger(__name__) - -class TestDetail(unittest.TestCase): - - - def test_detail_process(self, capsys): - output_capture = StringIO() - detail_process("not_existing_id") - captured = capsys.readouterr() - output = output_capture.getvalue() - self.assertIn("No host found with id: not_existing_id", output) - - @unittest.skip("") - def test_detail_workflow(self): - stdout_capture = StringIO() - detail_workflow("not_existing_id") - output = stdout_capture.getvalue() - self.assertIn("No process found with id: not_existing_id", output) - - @unittest.skip("") - def test_detail_host(self): - stdout_capture = StringIO() - detail_host("not_existing_id") - output = stdout_capture.getvalue() - self.assertIn("No workflow found with id: not_existing_id", output) +def test_detail_process(capfd): + detail_process("not_existing_id") + output, err = capfd.readouterr() + logger.info("stdout_output"+output) + logger.info("stderr_output"+err) + assert "No process found with id: not_existing_id" in output + + +def test_detail_workflow(capfd): + detail_workflow("not_existing_id") + output, err = capfd.readouterr() + logger.info("stdout_output"+output) + logger.info("stderr_output"+err) + assert "No workflow found with id: not_existing_id" in output + + +def test_detail_host(capfd): + detail_host("not_existing_id") + output, err = capfd.readouterr() + logger.info("stdout_output"+output) + logger.info("stderr_output"+err) + assert "No host found with id: not_existing_id" in output