mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-25 07:47:17 +00:00
* block issues without templates * add setup subcommand * handle devtools config correctly
24 lines
653 B
Python
24 lines
653 B
Python
import argparse
|
|
|
|
from pytest_mock import MockerFixture
|
|
|
|
from ahriman.application.handlers import Remove
|
|
from ahriman.core.configuration import Configuration
|
|
|
|
|
|
def _default_args(args: argparse.Namespace) -> argparse.Namespace:
|
|
args.package = []
|
|
return args
|
|
|
|
|
|
def test_run(args: argparse.Namespace, configuration: Configuration, mocker: MockerFixture) -> None:
|
|
"""
|
|
must run command
|
|
"""
|
|
args = _default_args(args)
|
|
mocker.patch("pathlib.Path.mkdir")
|
|
application_mock = mocker.patch("ahriman.application.application.Application.remove")
|
|
|
|
Remove.run(args, "x86_64", configuration)
|
|
application_mock.assert_called_once()
|