pre-commit: run black without string normalization

This commit is contained in:
Erik Sundell
2021-11-01 09:42:45 +01:00
parent e75de14839
commit 771ae59636
32 changed files with 691 additions and 587 deletions

View File

@@ -36,10 +36,8 @@ def test_default_config(tmpdir, tljh_dir):
"http": {"address": ":80"},
"auth_api": {
"address": "127.0.0.1:8099",
"auth": {
"basic": {"users": [""]}
},
"whiteList": {"sourceRange": ["127.0.0.1"]}
"auth": {"basic": {"users": [""]}},
"whiteList": {"sourceRange": ["127.0.0.1"]},
},
}
@@ -72,10 +70,8 @@ def test_letsencrypt_config(tljh_dir):
"https": {"address": ":443", "tls": {"minVersion": "VersionTLS12"}},
"auth_api": {
"address": "127.0.0.1:8099",
"auth": {
"basic": {"users": [""]}
},
"whiteList": {"sourceRange": ["127.0.0.1"]}
"auth": {"basic": {"users": [""]}},
"whiteList": {"sourceRange": ["127.0.0.1"]},
},
}
assert cfg["acme"] == {
@@ -113,18 +109,17 @@ def test_manual_ssl_config(tljh_dir):
"minVersion": "VersionTLS12",
"certificates": [
{"certFile": "/path/to/ssl.cert", "keyFile": "/path/to/ssl.key"}
]
],
},
},
"auth_api": {
"address": "127.0.0.1:8099",
"auth": {
"basic": {"users": [""]}
},
"whiteList": {"sourceRange": ["127.0.0.1"]}
"auth": {"basic": {"users": [""]}},
"whiteList": {"sourceRange": ["127.0.0.1"]},
},
}
def test_extra_config(tmpdir, tljh_dir):
extra_config_dir = os.path.join(tljh_dir, config.CONFIG_DIR, "traefik_config.d")
state_dir = tmpdir.mkdir("state")
@@ -146,13 +141,9 @@ def test_extra_config(tmpdir, tljh_dir):
# modify existing value
"logLevel": "ERROR",
# modify existing value with multiple levels
"entryPoints": {
"auth_api": {
"address": "127.0.0.1:9999"
}
},
"entryPoints": {"auth_api": {"address": "127.0.0.1:9999"}},
# add new setting
"checkNewVersion": False
"checkNewVersion": False,
}
with open(os.path.join(extra_config_dir, "extra.toml"), "w+") as extra_config_file: