diff options
Diffstat (limited to '')
| -rw-r--r-- | tests/forms/test_validators.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/forms/test_validators.py b/tests/forms/test_validators.py index 8822310..2c427d3 100644 --- a/tests/forms/test_validators.py +++ b/tests/forms/test_validators.py @@ -28,8 +28,11 @@ def test_allowed_hostname_accepts_configured_hostname(app: Flask) -> None: def test_allowed_hostname_rejects_unconfigured_hostname(app: Flask) -> None: app.config["ALLOWED_TARGET_HOSTNAMES"] = ["dennisfink.me"] form = URLForm(MultiDict({"url": "https://example.com/post"})) - with app.app_context(), pytest.raises( - ValidationError, match="Target hostname is not in ALLOWED_TARGET_HOSTNAMES" + with ( + app.app_context(), + pytest.raises( + ValidationError, match="Target hostname is not in ALLOWED_TARGET_HOSTNAMES" + ), ): AllowedTargetHostname()(form, form.url) |
