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")), } ) ),