from os import environ import pytest from fastapi import FastAPI from httpx import AsyncClient environ["ARGOS_APP_ENV"] = "test" @pytest.fixture def app() -> FastAPI: from argos.server.main import get_application # local import for testing purpose return get_application() @pytest.fixture def authorized_client( client: AsyncClient, token: str, authorization_prefix: str ) -> AsyncClient: client.headers = { "Authorization": f"Bearer {token}", **client.headers, } return client