From ad37262c3a908868f53b8edd79fa9c456536b02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ka=C5=88kovsk=C3=BD?= Date: Tue, 20 Aug 2024 11:31:56 +0200 Subject: [PATCH] Update test for comunicate --- pyanaconda/ui/webui/__init__.py | 3 +-- tests/unit_tests/pyanaconda_tests/ui/test_webui.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyanaconda/ui/webui/__init__.py b/pyanaconda/ui/webui/__init__.py index 739f39d49762..d6fb12c98604 100644 --- a/pyanaconda/ui/webui/__init__.py +++ b/pyanaconda/ui/webui/__init__.py @@ -150,6 +150,7 @@ def _run_webui(self): reset_lang=False ) + log.debug("cockpit web view has been started") with open(self._viewer_pid_file, "w") as f: f.write(repr(proc.pid)) @@ -159,8 +160,6 @@ def _run_webui(self): if output_string and output_string[-1] != "\n": output_string = output_string + "\n" - log.debug("ddddd output: %s errors: %s", output_string, err_string) - with program_log_lock: if output_string: for line in output_string.splitlines(): diff --git a/tests/unit_tests/pyanaconda_tests/ui/test_webui.py b/tests/unit_tests/pyanaconda_tests/ui/test_webui.py index f2a9a04c0d6a..460a13318ca2 100644 --- a/tests/unit_tests/pyanaconda_tests/ui/test_webui.py +++ b/tests/unit_tests/pyanaconda_tests/ui/test_webui.py @@ -187,6 +187,7 @@ def test_run_not_on_live(self, mocked_conf, mocked_startProgram): mocked_conf.system.provides_liveuser = False mocked_process = Mock() mocked_process.pid = 12345 + mocked_process.communicate.return_value = ("", "") mocked_startProgram.return_value = mocked_process with tempfile.TemporaryDirectory() as fd: