1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-02 20:15:24 +02:00

fix #967 and test error to catch (#979)

* fix #967 and test error to catch

* add admin tests
This commit is contained in:
Hayden 2022-02-13 18:33:25 -09:00 committed by GitHub
parent c617251f4c
commit 14cc541f7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 94 additions and 54 deletions

View file

@ -1,11 +1,11 @@
import json
import requests
from fastapi.testclient import TestClient
from .app_routes import AppRoutes
def login(form_data, api_client: requests, api_routes: AppRoutes):
def login(form_data, api_client: TestClient, api_routes: AppRoutes):
response = api_client.post(api_routes.auth_token, form_data)
assert response.status_code == 200
token = json.loads(response.text).get("access_token")