mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Turns out msettings interface is None is ran from pytest because we bypass the usual moulinette init :/
This commit is contained in:
parent
9bf4a12f32
commit
9807b76d34
2 changed files with 2 additions and 4 deletions
|
@ -401,9 +401,6 @@ def _hook_exec_bash(path, args, chdir, env, return_format, loggers):
|
||||||
_env = os.environ.copy()
|
_env = os.environ.copy()
|
||||||
_env.update(env)
|
_env.update(env)
|
||||||
|
|
||||||
# FIXME : this is a temporary debug to better understand why the test are failing on the CI but not when ran manually...
|
|
||||||
logger.warning(_env)
|
|
||||||
|
|
||||||
returncode = call_async_output(
|
returncode = call_async_output(
|
||||||
cmd, loggers, shell=True, cwd=chdir,
|
cmd, loggers, shell=True, cwd=chdir,
|
||||||
stdinfo=stdinfo, env=_env
|
stdinfo=stdinfo, env=_env
|
||||||
|
|
|
@ -3,7 +3,7 @@ import pytest
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import moulinette
|
import moulinette
|
||||||
from moulinette import m18n
|
from moulinette import m18n, msettings
|
||||||
from yunohost.utils.error import YunohostError
|
from yunohost.utils.error import YunohostError
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
sys.path.append("..")
|
sys.path.append("..")
|
||||||
|
@ -78,3 +78,4 @@ def pytest_cmdline_main(config):
|
||||||
sys.path.insert(0, "/usr/lib/moulinette/")
|
sys.path.insert(0, "/usr/lib/moulinette/")
|
||||||
import yunohost
|
import yunohost
|
||||||
yunohost.init(debug=config.option.yunodebug)
|
yunohost.init(debug=config.option.yunodebug)
|
||||||
|
msettings["interface"] = "test"
|
||||||
|
|
Loading…
Add table
Reference in a new issue