tests/test_profile: hoist sqlalchemy import to module top

ruff E402: import was after non-import top-level code.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
mwiegand 2026-05-11 22:01:29 +02:00
parent f643246a84
commit cb52a69faf
No known key found for this signature in database

View file

@ -1,4 +1,5 @@
import pytest
from sqlalchemy import select
from l4d2web.app import create_app
from l4d2web.auth import hash_password
@ -58,9 +59,6 @@ def test_base_template_links_username_to_profile(app_and_user):
assert ">alice<" in body
from sqlalchemy import select
def _post_pw(client, **fields):
payload = {"csrf_token": "test-token", **fields}
return client.post("/profile/password", data=payload, follow_redirects=False)