🎨 Format files with pre-commit and Ruff (#611)

This commit is contained in:
Sebastián Ramírez
2024-02-25 19:39:33 +01:00
committed by GitHub
parent 2802a4df9e
commit 0cc802eec8
35 changed files with 156 additions and 163 deletions

View File

@@ -1,5 +1,3 @@
from typing import Dict
from fastapi.testclient import TestClient
from sqlalchemy.orm import Session
@@ -12,7 +10,7 @@ from app.tests.utils.utils import random_email, random_lower_string
def user_authentication_headers(
*, client: TestClient, email: str, password: str
) -> Dict[str, str]:
) -> dict[str, str]:
data = {"username": email, "password": password}
r = client.post(f"{settings.API_V1_STR}/login/access-token", data=data)
@@ -32,7 +30,7 @@ def create_random_user(db: Session) -> User:
def authentication_token_from_email(
*, client: TestClient, email: str, db: Session
) -> Dict[str, str]:
) -> dict[str, str]:
"""
Return a valid token for the user with given email.