mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 15:27:17 +00:00
The issue appears when there is no boto, jinja and some other libraries are not installed because the classes which use these libraries are still being imported inside the package file. The fix removes those imports from package root, because they should not be here, in fact, content of report and upload packages must be imported only inside the trigger class and only if they are actually required This commit also adds setuptools as required dependency since it is used for some parsers (previously it was provided dependency)
14 lines
452 B
Python
14 lines
452 B
Python
from pathlib import Path
|
|
from pytest_mock import MockerFixture
|
|
|
|
from ahriman.core.upload.rsync import Rsync
|
|
|
|
|
|
def test_sync(rsync: Rsync, mocker: MockerFixture) -> None:
|
|
"""
|
|
must run sync command
|
|
"""
|
|
check_output_mock = mocker.patch("ahriman.core.upload.rsync.Rsync._check_output")
|
|
rsync.sync(Path("path"), [])
|
|
check_output_mock.assert_called_once_with(*rsync.command, "path", rsync.remote, exception=None, logger=rsync.logger)
|