Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
m-czernek committed Mar 25, 2024
1 parent a75f6e3 commit 4d6de65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unit/modules/test_openscap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))}
)
),
):
Expand Down Expand Up @@ -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"))}
)
),
):
Expand Down Expand Up @@ -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"))}
)
),
):
Expand Down Expand Up @@ -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")),
}
)
),
Expand Down

0 comments on commit 4d6de65

Please sign in to comment.