tests: fix LDAP email placeholder test

This commit is contained in:
Éloi Rivard 2024-11-20 23:49:08 +01:00
parent 6c463ce856
commit ac8dc19ff2
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184

View file

@ -261,10 +261,10 @@ def test_login_placeholder(testclient):
testclient.app.config["CANAILLE_LDAP"]["USER_FILTER"] = "(mail={{ login }})"
placeholder = testclient.get("/login").form["login"].attrs["placeholder"]
assert placeholder == "john@doe.test"
assert placeholder == "john.doe@example.com"
testclient.app.config["CANAILLE_LDAP"]["USER_FILTER"] = (
"(|(uid={{ login }})(mail={{ login }}))"
)
placeholder = testclient.get("/login").form["login"].attrs["placeholder"]
assert placeholder == "jdoe or john@doe.test"
assert placeholder == "jdoe or john.doe@example.com"