Create a test practice session.
(db: Session, test_user, test_collection)
| 48 | |
| 49 | @pytest.fixture |
| 50 | def test_practice_session(db: Session, test_user, test_collection): |
| 51 | """Create a test practice session.""" |
| 52 | practice_session = PracticeSession( |
| 53 | user_id=test_user.id, |
| 54 | collection_id=test_collection.id, |
| 55 | total_cards=2, |
| 56 | ) |
| 57 | db.add(practice_session) |
| 58 | db.commit() |
| 59 | db.refresh(practice_session) |
| 60 | return practice_session |
| 61 | |
| 62 | |
| 63 | @pytest.fixture |
nothing calls this directly
no test coverage detected