mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
fix moulinette cli _do_authenticate
This commit is contained in:
parent
3abde9c008
commit
1cfec24ac2
1 changed files with 3 additions and 1 deletions
|
@ -128,7 +128,7 @@ def moulinette_webapi(moulinette):
|
|||
|
||||
|
||||
@pytest.fixture
|
||||
def moulinette_cli(moulinette):
|
||||
def moulinette_cli(moulinette, mocker):
|
||||
# Dirty hack needed, otherwise cookies ain't reused between request .. not
|
||||
# sure why :|
|
||||
import argparse
|
||||
|
@ -137,10 +137,12 @@ def moulinette_cli(moulinette):
|
|||
action='store_true', default=False,
|
||||
help="Log and print debug messages",
|
||||
)
|
||||
mocker.patch("os.isatty", return_value=True)
|
||||
moulinette_cli = moulinette.core.init_interface(
|
||||
"cli",
|
||||
actionsmap={"namespaces": ["moulitest"], "use_cache": False, "parser_kwargs": {'top_parser': parser}},
|
||||
)
|
||||
mocker.stopall()
|
||||
|
||||
return moulinette_cli
|
||||
|
||||
|
|
Loading…
Reference in a new issue