chore(quality): apply ruff autofixes and formatting (223 fixes, regression-free: 118/118 tests pass)
This commit is contained in:
@@ -4,7 +4,6 @@ from __future__ import annotations
|
||||
|
||||
from httpx import AsyncClient
|
||||
|
||||
|
||||
# === /users/me ===
|
||||
|
||||
|
||||
@@ -36,9 +35,10 @@ async def test_get_me_invalid_token_format(client: AsyncClient) -> None:
|
||||
|
||||
async def test_get_me_bogus_token(client: AsyncClient) -> None:
|
||||
"""GET /api/v1/users/me with a token signed with the wrong key returns 401."""
|
||||
from jose import jwt
|
||||
import time
|
||||
|
||||
from jose import jwt
|
||||
|
||||
bogus = jwt.encode(
|
||||
{
|
||||
"sub": "1",
|
||||
@@ -173,9 +173,7 @@ async def test_list_users_as_sales_rep_forbidden(
|
||||
# === Refresh & Logout ===
|
||||
|
||||
|
||||
async def test_refresh_token(
|
||||
client: AsyncClient, auth_headers: dict[str, str]
|
||||
) -> None:
|
||||
async def test_refresh_token(client: AsyncClient, auth_headers: dict[str, str]) -> None:
|
||||
"""POST /api/v1/auth/refresh issues a new token for the current user."""
|
||||
resp = await client.post("/api/v1/auth/refresh", headers=auth_headers)
|
||||
assert resp.status_code == 200, resp.text
|
||||
@@ -185,9 +183,7 @@ async def test_refresh_token(
|
||||
assert data["expires_in"] > 0
|
||||
|
||||
|
||||
async def test_logout(
|
||||
client: AsyncClient, auth_headers: dict[str, str]
|
||||
) -> None:
|
||||
async def test_logout(client: AsyncClient, auth_headers: dict[str, str]) -> None:
|
||||
"""POST /api/v1/auth/logout returns 200 with confirmation message."""
|
||||
resp = await client.post("/api/v1/auth/logout", headers=auth_headers)
|
||||
assert resp.status_code == 200, resp.text
|
||||
|
||||
Reference in New Issue
Block a user