mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-06-03 13:44:55 -04:00
* update aiofiles and dotenv * bump fastapi and pydantic * update testclient * bump ruff and uvicorn
13 lines
354 B
Python
13 lines
354 B
Python
import json
|
|
|
|
from fastapi.testclient import TestClient
|
|
|
|
from tests.utils import api_routes
|
|
|
|
|
|
def login(form_data, api_client: TestClient):
|
|
response = api_client.post(api_routes.auth_token, data=form_data)
|
|
assert response.status_code == 200
|
|
token = json.loads(response.text).get("access_token")
|
|
return {"Authorization": f"Bearer {token}"}
|