mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-16 17:01:30 +00:00
[PR #11145/255059f7 backport][stable-12] fix ruff case B015 (#11146)
fix ruff case B015 (#11145)
* fix ruff case B015
* add changelog frag
(cherry picked from commit 255059f7b3)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
04fb53e8a3
commit
0813907a89
5 changed files with 16 additions and 17 deletions
|
|
@ -354,7 +354,7 @@ class TestPacman:
|
|||
|
||||
with pytest.raises(AnsibleExitJson) as e:
|
||||
P.run()
|
||||
self.mock_run_command.call_count == 0
|
||||
assert self.mock_run_command.call_count == 0
|
||||
out = e.value.args[0]
|
||||
assert "packages" not in out
|
||||
assert out["changed"]
|
||||
|
|
@ -494,7 +494,7 @@ class TestPacman:
|
|||
out = e.value.args[0]
|
||||
|
||||
if check_mode_value:
|
||||
self.mock_run_command.call_count == 0
|
||||
assert self.mock_run_command.call_count == 0
|
||||
|
||||
if run_command_data and "args" in run_command_data:
|
||||
self.mock_run_command.assert_called_with(mock.ANY, run_command_data["args"], check_rc=False)
|
||||
|
|
@ -672,7 +672,7 @@ class TestPacman:
|
|||
assert not out["changed"]
|
||||
assert "packages" in out
|
||||
assert "diff" not in out
|
||||
self.mock_run_command.call_count == 0
|
||||
assert self.mock_run_command.call_count == 0
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"module_args, expected_packages, package_list_out, run_command_data, raises",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue