feat: scaffold personal progress monitor MVP
This commit is contained in:
23
tests/conftest.py
Normal file
23
tests/conftest.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from app.auth import SessionManager, make_password_hash
|
||||
from app.main import create_app
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def client(tmp_path: Path):
|
||||
app = create_app(tmp_path / "data", Path(__file__).parents[1] / "config" / "layouts", SessionManager(None))
|
||||
with TestClient(app) as test_client:
|
||||
yield test_client
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def auth_client(tmp_path: Path):
|
||||
manager = SessionManager(make_password_hash("secret"))
|
||||
app = create_app(tmp_path / "data", Path(__file__).parents[1] / "config" / "layouts", manager)
|
||||
with TestClient(app) as test_client:
|
||||
yield test_client
|
||||
|
||||
Reference in New Issue
Block a user