1
0
Files
coldcall_lti/tests/conftest.py
Benjamin Mako Hill 903209d3d5 Phase 3: instructor in-class UI
Live mode with resolve-before-next call flow and one-tap outcomes
(assessments, missing, skip); printable numbered call lists with
pictures and a blank notes column; a day editor for after-class
outcome entry, replacing hand-editing of call_list TSVs; and a
per-course settings page (selection mode, weight factor, assessment
visibility). Selection honors opt-outs and the course's mode: weighted
draws use full-course answered-call history, cycle mode calls everyone
once per day before starting over and treats skips as never called.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 16:40:04 -07:00

35 lines
834 B
Python

import pytest
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from coldcall_lti import create_app
from coldcall_lti.config import Config
from coldcall_lti.db import Base
@pytest.fixture
def db_session():
engine = create_engine("sqlite://")
Base.metadata.create_all(engine)
session = sessionmaker(bind=engine)()
yield session
session.close()
engine.dispose()
def make_app(tmp_path, dev_mode=True):
class TestConfig(Config):
TESTING = True
DATABASE_URL = f"sqlite:///{tmp_path}/test.sqlite3"
DEV_MODE = dev_mode
SECRET_KEY = "test"
app = create_app(TestConfig)
Base.metadata.create_all(app.extensions["db_engine"])
return app
@pytest.fixture
def dev_client(tmp_path):
return make_app(tmp_path, dev_mode=True).test_client()