Skip to content

Commit 5584210

Browse files
committed
update tests with new fr_FR translation
1 parent e486ca3 commit 5584210

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

tests/test_change_username.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def test_xlation(app, client, get_message_local, outbox):
169169
response = client.get("/change", follow_redirects=True)
170170
with app.test_request_context():
171171
# Check header
172-
assert b"<h1>Changer le mot de passe</h1>" in response.data
172+
assert b"<h1>Changer de mot de passe</h1>" in response.data
173173
submit = localize_callback(_default_field_labels["change_password"])
174174
assert f'value="{submit}"'.encode() in response.data
175175

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def test_cli_locale(script_info):
149149
users_create, ["--password", "battery staple"], obj=script_info
150150
)
151151
assert result.exit_code == 2
152-
assert "Merci d'indiquer une adresse email" in result.output
152+
assert "Aucune adresse email n'est indiquée" in result.output
153153

154154

155155
def test_cli_createrole(script_info):

tests/test_misc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ def test_form_labels(app, sqlalchemy_datastore):
685685
assert str(form.password.label.text) == "Mot de passe"
686686
assert str(form.new_password.label.text) == "Nouveau mot de passe"
687687
assert str(form.new_password_confirm.label.text) == "Confirmer le mot de passe"
688-
assert str(form.submit.label.text) == "Changer le mot de passe"
688+
assert str(form.submit.label.text) == "Changer de mot de passe"
689689

690690

691691
@pytest.mark.babel()
@@ -750,7 +750,7 @@ def get_locale():
750750
assert response.status_code == 200
751751

752752
# verify errors are xlated
753-
assert b"Merci d&#39;indiquer un mot de passe" in response.data
753+
assert b"Aucun mot de passe n&#39;est indiqu\xc3\xa9" in response.data
754754

755755
# log in correctly - this should set locale in session
756756
data = dict(email="matt@lp.com", password="password", remember="y")
@@ -763,7 +763,7 @@ def get_locale():
763763
response = client.get("/change", follow_redirects=True)
764764
assert response.status_code == 200
765765
assert b"Nouveau mot de passe" in response.data
766-
assert b"<h1>Changer le mot de passe</h1>" in response.data
766+
assert b"<h1>Changer de mot de passe</h1>" in response.data
767767

768768
# try JSON
769769
response = client.post(
@@ -773,7 +773,7 @@ def get_locale():
773773
)
774774
assert response.status_code == 400
775775
assert response.json["response"]["field_errors"]["new_password"] == [
776-
"Merci d'indiquer un mot de passe"
776+
"Aucun mot de passe n'est indiqué"
777777
]
778778

779779

tests/test_registerable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def on_user_registered(app, **kwargs):
191191

192192
with app.test_request_context():
193193
assert (
194-
get_message_local("CONFIRM_REGISTRATION", email="me@fr.com").encode("utf-8")
194+
get_message_local("CONFIRM_REGISTRATION", email="me@fr.com").replace("'", "&#39;").encode("utf-8")
195195
in response.data
196196
)
197197
assert b"Home Page" in response.data

tests/test_two_factor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,7 +1584,7 @@ def test_xlation(app, client, get_message_local):
15841584
response = authenticate(client, email="gal2@lp.com", follow_redirects=True)
15851585
with app.test_request_context():
15861586
existing = (
1587-
"Veuillez saisir votre code d'authentification généré via: authentificateur"
1587+
"Veuillez saisir votre code d'authentification généré avec : authentificateur"
15881588
)
15891589
assert markupsafe.escape(existing).encode() in response.data
15901590
with app.app_context():
@@ -1594,7 +1594,7 @@ def test_xlation(app, client, get_message_local):
15941594
client.post("/tf-validate", data=dict(code=code), follow_redirects=True)
15951595
response = client.get("/tf-setup", follow_redirects=True)
15961596
with app.test_request_context():
1597-
existing = "Méthode à deux facteurs actuellement configurée : authentificateur"
1597+
existing = "Méthode d'authentification à deux facteurs actuellement configurée : authentificateur"
15981598
assert markupsafe.escape(existing).encode() in response.data
15991599

16001600

tests/test_unified_signin.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2188,8 +2188,8 @@ def test_xlation(app, client, get_message_local):
21882188
with app.test_request_context():
21892189
assert markupsafe.escape("SMS").encode() in response.data
21902190
p = [
2191-
"Options de connexion actuellement actives : mot de passe et e-mail.",
2192-
"Options de connexion actuellement actives : e-mail et mot de passe.",
2191+
"Options de connexion actuellement activées : mot de passe et email.",
2192+
"Options de connexion actuellement activées : email et mot de passe.",
21932193
]
21942194
assert any(markupsafe.escape(s).encode() in response.data for s in p)
21952195

@@ -2213,7 +2213,7 @@ def test_empty_password_xlate(app, client, get_message):
22132213
with app.test_request_context():
22142214
assert (
22152215
markupsafe.escape(
2216-
"Options de connexion actuellement actives : e-mail."
2216+
"Options de connexion actuellement activées : email."
22172217
).encode()
22182218
in response.data
22192219
)
@@ -2223,7 +2223,7 @@ def test_empty_password_xlate(app, client, get_message):
22232223
with app.test_request_context():
22242224
assert (
22252225
markupsafe.escape(
2226-
"Options de connexion actuellement actives : aucune."
2226+
"Options de connexion actuellement activées : aucune."
22272227
).encode()
22282228
in response.data
22292229
)
@@ -2232,7 +2232,7 @@ def test_empty_password_xlate(app, client, get_message):
22322232
with app.test_request_context():
22332233
assert (
22342234
markupsafe.escape(
2235-
"Options de connexion actuellement actives : aucune."
2235+
"Options de connexion actuellement activées : aucune."
22362236
).encode()
22372237
in response.data
22382238
)

0 commit comments

Comments
 (0)