mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-14 22:45:47 +00:00
Feature/all archs (#21)
* add init subcommand * add also init command to repository object * add ability to generate list of architectures * check if architecture list is not empty
This commit is contained in:
@ -4,6 +4,15 @@ from unittest import mock
|
||||
from ahriman.models.repository_paths import RepositoryPaths
|
||||
|
||||
|
||||
def test_known_architectures(repository_paths: RepositoryPaths, mocker: MockerFixture) -> None:
|
||||
"""
|
||||
must list available directory paths
|
||||
"""
|
||||
iterdir_mock = mocker.patch("pathlib.Path.iterdir")
|
||||
repository_paths.known_architectures(repository_paths.root)
|
||||
iterdir_mock.assert_called_once()
|
||||
|
||||
|
||||
def test_create_tree(repository_paths: RepositoryPaths, mocker: MockerFixture) -> None:
|
||||
"""
|
||||
must create whole tree
|
||||
@ -11,7 +20,7 @@ def test_create_tree(repository_paths: RepositoryPaths, mocker: MockerFixture) -
|
||||
paths = {
|
||||
prop
|
||||
for prop in dir(repository_paths)
|
||||
if not prop.startswith("_") and prop not in ("architecture", "create_tree", "root")
|
||||
if not prop.startswith("_") and prop not in ("architecture", "create_tree", "known_architectures", "root")
|
||||
}
|
||||
mkdir_mock = mocker.patch("pathlib.Path.mkdir")
|
||||
|
||||
|
Reference in New Issue
Block a user