refactor: drop _check_output class attribute

This commit is contained in:
2023-10-23 02:24:53 +03:00
parent 42f77742f8
commit 54bd016c17
12 changed files with 81 additions and 95 deletions

View File

@ -17,7 +17,7 @@ def test_repo_add(repo: Repo, mocker: MockerFixture) -> None:
"""
must call repo-add on package addition
"""
check_output_mock = mocker.patch("ahriman.core.alpm.repo.Repo._check_output")
check_output_mock = mocker.patch("ahriman.core.alpm.repo.check_output")
repo.add(Path("path"))
check_output_mock.assert_called_once() # it will be checked later
@ -28,7 +28,7 @@ def test_repo_init(repo: Repo, mocker: MockerFixture) -> None:
"""
must call repo-add with empty package list on repo initializing
"""
check_output_mock = mocker.patch("ahriman.core.alpm.repo.Repo._check_output")
check_output_mock = mocker.patch("ahriman.core.alpm.repo.check_output")
repo.init()
check_output_mock.assert_called_once() # it will be checked later
@ -40,7 +40,7 @@ def test_repo_remove(repo: Repo, mocker: MockerFixture) -> None:
must call repo-remove on package addition
"""
mocker.patch("pathlib.Path.glob", return_value=[])
check_output_mock = mocker.patch("ahriman.core.alpm.repo.Repo._check_output")
check_output_mock = mocker.patch("ahriman.core.alpm.repo.check_output")
repo.remove("package", Path("package.pkg.tar.xz"))
check_output_mock.assert_called_once() # it will be checked later