mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-29 13:49:57 +00:00
migrate to tox
this also requires to move default configuration files to share/ahriman. Thus the following features have been added * default configuration is not stored in /usr/share/ahriman/settings * package installed via PKGBUILD now copies files from /usr * configuration class now fallbacks to default in /usr
This commit is contained in:
@ -14,6 +14,7 @@ def test_from_path(mocker: MockerFixture) -> None:
|
||||
"""
|
||||
must load configuration
|
||||
"""
|
||||
mocker.patch("pathlib.Path.is_file", return_value=True)
|
||||
read_mock = mocker.patch("ahriman.core.configuration.Configuration.read")
|
||||
load_includes_mock = mocker.patch("ahriman.core.configuration.Configuration.load_includes")
|
||||
load_logging_mock = mocker.patch("ahriman.core.configuration.Configuration.load_logging")
|
||||
@ -26,6 +27,19 @@ def test_from_path(mocker: MockerFixture) -> None:
|
||||
load_logging_mock.assert_called_once_with(True)
|
||||
|
||||
|
||||
def test_from_path_file_missing(mocker: MockerFixture) -> None:
|
||||
"""
|
||||
must load configuration based on package files
|
||||
"""
|
||||
mocker.patch("pathlib.Path.is_file", return_value=False)
|
||||
mocker.patch("ahriman.core.configuration.Configuration.load_includes")
|
||||
mocker.patch("ahriman.core.configuration.Configuration.load_logging")
|
||||
read_mock = mocker.patch("ahriman.core.configuration.Configuration.read")
|
||||
|
||||
configuration = Configuration.from_path(Path("path"), "x86_64", True)
|
||||
read_mock.assert_called_once_with(configuration.SYSTEM_CONFIGURATION_PATH)
|
||||
|
||||
|
||||
def test_dump(configuration: Configuration) -> None:
|
||||
"""
|
||||
dump must not be empty
|
||||
|
Reference in New Issue
Block a user