Fix tests

This commit is contained in:
Alexandre Aubin 2021-08-28 02:03:33 +02:00
parent 0ccc0b63e7
commit 383aab55a6
2 changed files with 4 additions and 4 deletions

View file

@ -449,7 +449,7 @@
"migration_0019_slapd_config_will_be_overwritten": "Semella que editaches manualmente a configuración slapd. Para esta migración crítica YunoHost precisa forzar a actualización da configuración slapd. Os ficheiros orixinais van ser copiados en {conf_backup_folder}.",
"migration_0019_add_new_attributes_in_ldap": "Engadir novos atributos para os permisos na base de datos LDAP",
"migration_0018_failed_to_reset_legacy_rules": "Fallou o restablecemento das regras antigas de iptables: {error}",
"migration_0018_failed_to_migrate_iptables_rules": "Fallou a migración das regras antigas de iptables a nftables: {erro}",
"migration_0018_failed_to_migrate_iptables_rules": "Fallou a migración das regras antigas de iptables a nftables: {error}",
"migration_0017_not_enough_space": "Crea espazo suficiente en {path} para executar a migración.",
"migration_0017_postgresql_11_not_installed": "PostgreSQL 9.6 está instado, pero non postgresql 11? Algo raro debeu acontecer no teu sistema :(...",
"migration_0017_postgresql_96_not_installed": "PostgreSQL non está instalado no teu sistema. Nada que facer.",
@ -523,4 +523,4 @@
"permission_deleted": "O permiso '{permission}' foi eliminado",
"permission_cant_add_to_all_users": "O permiso {permission} non pode ser concecido a tódalas usuarias.",
"permission_currently_allowed_for_all_users": "Este permiso está concedido actualmente a tódalas usuarias ademáis de a outros grupos. Probablemente queiras ben eliminar o permiso 'all_users' ou ben eliminar os outros grupos que teñen permiso."
}
}

View file

@ -24,7 +24,7 @@ def test_authenticate_with_wrong_password():
with pytest.raises(MoulinetteError) as exception:
LDAPAuth().authenticate_credentials(credentials="bad_password_lul")
translation = m18n.g("invalid_password")
translation = m18n.n("invalid_password")
expected_msg = translation.format()
assert expected_msg in str(exception)
@ -52,7 +52,7 @@ def test_authenticate_change_password():
with pytest.raises(MoulinetteError) as exception:
LDAPAuth().authenticate_credentials(credentials="yunohost")
translation = m18n.g("invalid_password")
translation = m18n.n("invalid_password")
expected_msg = translation.format()
assert expected_msg in str(exception)