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:
18
tests/ahriman/application/handlers/test_handler_init.py
Normal file
18
tests/ahriman/application/handlers/test_handler_init.py
Normal file
@ -0,0 +1,18 @@
|
||||
import argparse
|
||||
|
||||
from pytest_mock import MockerFixture
|
||||
|
||||
from ahriman.application.handlers import Init
|
||||
from ahriman.core.configuration import Configuration
|
||||
|
||||
|
||||
def test_run(args: argparse.Namespace, configuration: Configuration, mocker: MockerFixture) -> None:
|
||||
"""
|
||||
must run command
|
||||
"""
|
||||
create_tree_mock = mocker.patch("ahriman.models.repository_paths.RepositoryPaths.create_tree")
|
||||
init_mock = mocker.patch("ahriman.core.alpm.repo.Repo.init")
|
||||
|
||||
Init.run(args, "x86_64", configuration)
|
||||
create_tree_mock.assert_called_once()
|
||||
init_mock.assert_called_once()
|
Reference in New Issue
Block a user