-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from oamg/update-preupgrade-task-reporting
Add alert and error fields to output (same as for pre-conversion)
- Loading branch information
Showing
11 changed files
with
240 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
from mock import patch | ||
|
||
from scripts.leapp_preupgrade import check_if_package_installed | ||
from scripts.leapp_preupgrade import _check_if_package_installed | ||
|
||
|
||
@patch("scripts.leapp_preupgrade.run_subprocess") | ||
def test_check_if_package_installed(mock_run_subprocess): | ||
pkg_name = "example-package" | ||
mock_run_subprocess.return_value = ("", 0) | ||
result = check_if_package_installed(pkg_name) | ||
expected_command = ["rpm", "-q", pkg_name] | ||
result = _check_if_package_installed(pkg_name) | ||
expected_command = ["/usr/bin/rpm", "-q", pkg_name] | ||
mock_run_subprocess.assert_called_once_with(expected_command) | ||
assert result |
Oops, something went wrong.