forked from Github-Mirrors/canaille
chore: pre-commit update
This commit is contained in:
parent
9af9a303ba
commit
bd57d69765
4 changed files with 11 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: 'v0.2.1'
|
rev: 'v0.3.1'
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
args: [--fix, --exit-non-zero-on-fix]
|
args: [--fix, --exit-non-zero-on-fix]
|
||||||
|
@ -25,7 +25,7 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: docformatter
|
- id: docformatter
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v3.15.0
|
rev: v3.15.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: ["--py38-plus"]
|
args: ["--py38-plus"]
|
||||||
|
|
|
@ -146,9 +146,9 @@ def test_mail_with_logo_in_http(testclient, logged_admin, smtpd, httpserver):
|
||||||
raw_logo = fd.read()
|
raw_logo = fd.read()
|
||||||
|
|
||||||
httpserver.expect_request(logo_path).respond_with_data(raw_logo)
|
httpserver.expect_request(logo_path).respond_with_data(raw_logo)
|
||||||
testclient.app.config[
|
testclient.app.config["LOGO"] = (
|
||||||
"LOGO"
|
f"http://{httpserver.host}:{httpserver.port}{logo_path}"
|
||||||
] = f"http://{httpserver.host}:{httpserver.port}{logo_path}"
|
)
|
||||||
assert len(smtpd.messages) == 0
|
assert len(smtpd.messages) == 0
|
||||||
|
|
||||||
res = testclient.get("/admin/mail")
|
res = testclient.get("/admin/mail")
|
||||||
|
|
|
@ -79,9 +79,9 @@ def test_install_schemas_twice(configuration, slapd_server):
|
||||||
def test_install_no_permissions_to_install_schemas(configuration, slapd_server):
|
def test_install_no_permissions_to_install_schemas(configuration, slapd_server):
|
||||||
configuration["BACKENDS"]["LDAP"]["ROOT_DN"] = slapd_server.suffix
|
configuration["BACKENDS"]["LDAP"]["ROOT_DN"] = slapd_server.suffix
|
||||||
configuration["BACKENDS"]["LDAP"]["URI"] = slapd_server.ldap_uri
|
configuration["BACKENDS"]["LDAP"]["URI"] = slapd_server.ldap_uri
|
||||||
configuration["BACKENDS"]["LDAP"][
|
configuration["BACKENDS"]["LDAP"]["BIND_DN"] = (
|
||||||
"BIND_DN"
|
"uid=admin,ou=users,dc=mydomain,dc=tld"
|
||||||
] = "uid=admin,ou=users,dc=mydomain,dc=tld"
|
)
|
||||||
configuration["BACKENDS"]["LDAP"]["BIND_PW"] = "admin"
|
configuration["BACKENDS"]["LDAP"]["BIND_PW"] = "admin"
|
||||||
|
|
||||||
with Backend(configuration).session():
|
with Backend(configuration).session():
|
||||||
|
|
|
@ -306,8 +306,8 @@ def test_login_placeholder(testclient):
|
||||||
placeholder = testclient.get("/login").form["login"].attrs["placeholder"]
|
placeholder = testclient.get("/login").form["login"].attrs["placeholder"]
|
||||||
assert placeholder == "john@doe.com"
|
assert placeholder == "john@doe.com"
|
||||||
|
|
||||||
testclient.app.config["BACKENDS"]["LDAP"][
|
testclient.app.config["BACKENDS"]["LDAP"]["USER_FILTER"] = (
|
||||||
"USER_FILTER"
|
"(|(uid={{ login }})(mail={{ login }}))"
|
||||||
] = "(|(uid={{ login }})(mail={{ login }}))"
|
)
|
||||||
placeholder = testclient.get("/login").form["login"].attrs["placeholder"]
|
placeholder = testclient.get("/login").form["login"].attrs["placeholder"]
|
||||||
assert placeholder == "jdoe or john@doe.com"
|
assert placeholder == "jdoe or john@doe.com"
|
||||||
|
|
Loading…
Reference in a new issue