feat: introduced pytest powered tests

This commit is contained in:
2026-08-18 20:09:59 +07:00
parent 938e924107
commit 7ae3c98585
5 changed files with 381 additions and 0 deletions

17
tests/conftest.py Normal file
View File

@@ -0,0 +1,17 @@
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()