Skip to content

Commit 649bf46

Browse files
style: fix formatting in test_security_middleware.py
- Applied `ruff format` to `tests/controller/test_security_middleware.py` to fix CI failure. - Verified linting passes with `poetry run ruff format --check`. Co-authored-by: lgcorzo <46710567+lgcorzo@users.noreply.github.com>
1 parent 71da7d2 commit 649bf46

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/controller/test_security_middleware.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
from fastapi.middleware.trustedhost import TrustedHostMiddleware
33
from regression_model_template.controller.kafka_app import app
44

5+
56
def test_middleware_presence():
67
"""Test that security middlewares are present in the FastAPI app."""
78
middleware_types = [m.cls for m in app.user_middleware]
89

910
assert CORSMiddleware in middleware_types, "CORSMiddleware should be present"
1011
assert TrustedHostMiddleware in middleware_types, "TrustedHostMiddleware should be present"
1112

13+
1214
def test_cors_configuration():
1315
"""Test CORS configuration defaults."""
1416
cors_middleware = next((m for m in app.user_middleware if m.cls == CORSMiddleware), None)
@@ -24,6 +26,7 @@ def test_cors_configuration():
2426
assert options["allow_methods"] == ["*"]
2527
assert options["allow_headers"] == ["*"]
2628

29+
2730
def test_trusted_host_configuration():
2831
"""Test TrustedHost configuration defaults."""
2932
trusted_host_middleware = next((m for m in app.user_middleware if m.cls == TrustedHostMiddleware), None)

0 commit comments

Comments
 (0)