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:
2022-03-21 02:58:45 +03:00
parent 13121298f5
commit fb02e676af
27 changed files with 115 additions and 83 deletions

View File

@ -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