Skip to content

Commit

Permalink
fix: ruff formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cofin committed Sep 14, 2024
1 parent c807865 commit dd1ca97
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/unit/test_middleware/test_csrf_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def test_csrf_successful_flow(get_handler: HTTPRouteHandler, post_handler: HTTPR
response = client.post("/", headers={"x-csrftoken": csrf_token})
assert response.status_code == HTTP_201_CREATED


def test_csrf_httponly_flow(get_handler: HTTPRouteHandler, post_handler: HTTPRouteHandler) -> None:
with create_test_client(
route_handlers=[get_handler, post_handler], csrf_config=CSRFConfig(secret="secret", cookie_httponly=True)
Expand All @@ -80,8 +81,9 @@ def test_csrf_httponly_flow(get_handler: HTTPRouteHandler, post_handler: HTTPRou
assert csrf_token is not None
assert "set-cookie" in response.headers
if csrf_token:
response = client.post("/" )
assert response.status_code == HTTP_201_CREATED
response = client.post("/")
assert response.status_code == HTTP_201_CREATED


@pytest.mark.parametrize(
"method",
Expand Down

0 comments on commit dd1ca97

Please sign in to comment.