mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix tests
This commit is contained in:
parent
f0d3d36365
commit
698d543c56
1 changed files with 3 additions and 3 deletions
|
@ -256,9 +256,9 @@ def test_parse_args_in_yunohost_format_password_input_no_ask():
|
||||||
def test_parse_args_in_yunohost_format_password_no_input_optional():
|
def test_parse_args_in_yunohost_format_password_no_input_optional():
|
||||||
questions = [{"name": "some_password", "type": "password", "optional": True, }]
|
questions = [{"name": "some_password", "type": "password", "optional": True, }]
|
||||||
answers = {}
|
answers = {}
|
||||||
|
expected_result = OrderedDict({"some_password": ("", "password")})
|
||||||
|
|
||||||
with pytest.raises(YunohostError):
|
assert _parse_args_in_yunohost_format(answers, questions) == expected_result
|
||||||
_parse_args_in_yunohost_format(answers, questions)
|
|
||||||
|
|
||||||
|
|
||||||
def test_parse_args_in_yunohost_format_password_optional_with_input():
|
def test_parse_args_in_yunohost_format_password_optional_with_input():
|
||||||
|
@ -727,7 +727,7 @@ def test_parse_args_in_yunohost_format_boolean_optional_with_empty_input():
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
answers = {}
|
answers = {}
|
||||||
expected_result = OrderedDict({"some_boolean": (0, "boolean")})
|
expected_result = OrderedDict({"some_boolean": (0, "boolean")}) # default to false
|
||||||
|
|
||||||
with patch.object(msignals, "prompt", return_value=""):
|
with patch.object(msignals, "prompt", return_value=""):
|
||||||
assert _parse_args_in_yunohost_format(answers, questions) == expected_result
|
assert _parse_args_in_yunohost_format(answers, questions) == expected_result
|
||||||
|
|
Loading…
Add table
Reference in a new issue