18 lines
381 B
Python
18 lines
381 B
Python
import sys
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
from fastapi.testclient import TestClient
|
|
|
|
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
|
|
|
from main import app
|
|
|
|
|
|
@pytest.fixture
|
|
def client():
|
|
app.dependency_overrides.clear()
|
|
with TestClient(app, raise_server_exceptions=False) as test_client:
|
|
yield test_client
|
|
app.dependency_overrides.clear()
|