mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-23 18:59:56 +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:
@ -131,7 +131,7 @@ def test_configuration_create_with_plain_password(
|
||||
assert generated.check_credentials(service.password, configuration.get("auth", "salt"))
|
||||
|
||||
|
||||
def test_configuration_get_exists(mocker: MockerFixture) -> None:
|
||||
def test_configuration_get(mocker: MockerFixture) -> None:
|
||||
"""
|
||||
must load configuration from filesystem
|
||||
"""
|
||||
@ -143,18 +143,6 @@ def test_configuration_get_exists(mocker: MockerFixture) -> None:
|
||||
read_mock.assert_called_once_with(Path("path") / "auth.ini")
|
||||
|
||||
|
||||
def test_configuration_get_not_exists(mocker: MockerFixture) -> None:
|
||||
"""
|
||||
must try to load configuration from filesystem
|
||||
"""
|
||||
mocker.patch("pathlib.Path.open")
|
||||
mocker.patch("pathlib.Path.is_file", return_value=False)
|
||||
read_mock = mocker.patch("ahriman.core.configuration.Configuration.read")
|
||||
|
||||
assert User.configuration_get(Path("path"))
|
||||
read_mock.assert_called_once_with(Path("path") / "auth.ini")
|
||||
|
||||
|
||||
def test_configuration_write(configuration: Configuration, mocker: MockerFixture) -> None:
|
||||
"""
|
||||
must write configuration
|
||||
|
Reference in New Issue
Block a user