Skip to content

Commit bf4e515

Browse files
authored
fix: add conftest.py with shared TestClient fixture for pytest
1 parent 3a65f30 commit bf4e515

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

backend/tests/conftest.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import pytest
2+
from fastapi.testclient import TestClient
3+
from backend.main import app
4+
5+
6+
@pytest.fixture(scope="module")
7+
def client():
8+
"""Provide a TestClient for all tests in this module."""
9+
with TestClient(app) as c:
10+
yield c

0 commit comments

Comments
 (0)