From 4d6de65269c808e298be15cadf2502cba85a3e89 Mon Sep 17 00:00:00 2001 From: Marek Czernek Date: Mon, 25 Mar 2024 14:41:30 +0100 Subject: [PATCH] Fix tests --- tests/unit/modules/test_openscap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/modules/test_openscap.py b/tests/unit/modules/test_openscap.py index 6fbdfed7cf..c20220ea97 100644 --- a/tests/unit/modules/test_openscap.py +++ b/tests/unit/modules/test_openscap.py @@ -35,7 +35,7 @@ def test_openscap_xccdf_eval_success(self): "salt.modules.openscap.Popen", MagicMock( return_value=Mock( - **{"returncode": 0, "communicate.return_value": ("", "")} + **{"returncode": 0, "communicate.return_value": (bytes(0), bytes(0))} ) ), ): @@ -82,7 +82,7 @@ def test_openscap_xccdf_eval_success_with_failing_rules(self): "salt.modules.openscap.Popen", MagicMock( return_value=Mock( - **{"returncode": 2, "communicate.return_value": ("", "some error")} + **{"returncode": 2, "communicate.return_value": (bytes(0), bytes("some error", "UTF-8"))} ) ), ): @@ -137,7 +137,7 @@ def test_openscap_xccdf_eval_success_ignore_unknown_params(self): "salt.modules.openscap.Popen", MagicMock( return_value=Mock( - **{"returncode": 2, "communicate.return_value": ("", "some error")} + **{"returncode": 2, "communicate.return_value": (bytes(0), bytes("some error", "UTF-8"))} ) ), ): @@ -180,7 +180,7 @@ def test_openscap_xccdf_eval_evaluation_error(self): return_value=Mock( **{ "returncode": 1, - "communicate.return_value": ("", "evaluation error"), + "communicate.return_value": (bytes(0), bytes("evaluation error", "UTF-8")), } ) ),