mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Friskies
This commit is contained in:
parent
2b3ec3ace8
commit
f03b992c6a
3 changed files with 5 additions and 6 deletions
|
@ -35,7 +35,6 @@ from moulinette.utils.log import getActionLogger
|
|||
from moulinette.utils.filesystem import read_file, write_to_file, read_toml, mkdir
|
||||
|
||||
from yunohost.domain import (
|
||||
domain_list,
|
||||
_assert_domain_exists,
|
||||
domain_config_get,
|
||||
_get_domain_settings,
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"""
|
||||
import os
|
||||
import time
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
from collections import OrderedDict
|
||||
|
||||
from moulinette import m18n, Moulinette
|
||||
|
@ -53,7 +53,7 @@ DOMAIN_SETTINGS_DIR = "/etc/yunohost/domains"
|
|||
# yunohost CLI and API which run in different processes
|
||||
domain_list_cache: List[str] = []
|
||||
domain_list_cache_timestamp = 0
|
||||
main_domain_cache: str = None
|
||||
main_domain_cache: Optional[str] = None
|
||||
main_domain_cache_timestamp = 0
|
||||
DOMAIN_CACHE_DURATION = 15
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ def test_authenticate_with_user_who_is_not_admin():
|
|||
with pytest.raises(MoulinetteError) as exception:
|
||||
LDAPAuth().authenticate_credentials(credentials="bob:test123Ynh")
|
||||
|
||||
translation = m18n.n("invalid_password")
|
||||
translation = m18n.n("invalid_credentials")
|
||||
expected_msg = translation.format()
|
||||
assert expected_msg in str(exception)
|
||||
|
||||
|
@ -58,7 +58,7 @@ def test_authenticate_with_wrong_password():
|
|||
with pytest.raises(MoulinetteError) as exception:
|
||||
LDAPAuth().authenticate_credentials(credentials="alice:bad_password_lul")
|
||||
|
||||
translation = m18n.n("invalid_password")
|
||||
translation = m18n.n("invalid_credentials")
|
||||
expected_msg = translation.format()
|
||||
assert expected_msg in str(exception)
|
||||
|
||||
|
@ -78,7 +78,7 @@ def test_authenticate_change_password():
|
|||
with pytest.raises(MoulinetteError) as exception:
|
||||
LDAPAuth().authenticate_credentials(credentials="alice:Yunohost")
|
||||
|
||||
translation = m18n.n("invalid_password")
|
||||
translation = m18n.n("invalid_credentials")
|
||||
expected_msg = translation.format()
|
||||
assert expected_msg in str(exception)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue