python-fastapi.conftest.mustache Maven / Gradle / Ivy
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from {{packageName}}.main import app as application
@pytest.fixture
def app() -> FastAPI:
application.dependency_overrides = {}
return application
@pytest.fixture
def client(app) -> TestClient:
return TestClient(app)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy