chore: initialize public repository
CI / checks (push) Has been cancelled

This commit is contained in:
maddin
2026-03-22 12:55:55 +00:00
commit 9794362f39
143 changed files with 19832 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
from pathlib import Path
import sys
import pytest
ROOT_DIR = Path(__file__).resolve().parents[1]
if str(ROOT_DIR) not in sys.path:
sys.path.insert(0, str(ROOT_DIR))
from app.config import Settings
from app.main import create_app
def make_settings(db_url: str) -> Settings:
return Settings(
APP_ENV="test",
DB_URL=db_url,
SESSION_SECRET="test-secret",
COOKIE_SECURE=False,
COOKIE_SAMESITE="lax",
LOGIN_RATE_LIMIT_ATTEMPTS=5,
LOGIN_RATE_LIMIT_WINDOW_MINUTES=15,
)
@pytest.fixture()
def app(tmp_path):
db_path = tmp_path / "test.db"
settings = make_settings(f"sqlite:///{db_path}")
return create_app(settings)