Files
clan-core/pkgs/clan-cli/tests/api.py
2023-11-14 16:39:20 +01:00

15 lines
368 B
Python

import logging
import pytest
from fastapi.testclient import TestClient
from clan_cli.webui.app import app
# TODO: Why stateful
@pytest.fixture(scope="session")
def api() -> TestClient:
# logging.getLogger("httpx").setLevel(level=logging.WARNING)
logging.getLogger("asyncio").setLevel(logging.INFO)
return TestClient(app, raise_server_exceptions=False)