(db)
| 13 | |
| 14 | @pytest.fixture |
| 15 | def collection_with_sessions(db): |
| 16 | def _create(user_id, num_cards=5, num_sessions=10): |
| 17 | collection = Collection(name="Test Collection", user_id=user_id) |
| 18 | db.add(collection) |
| 19 | db.flush() |
| 20 | cards = create_cards(db, collection, num_cards) |
| 21 | sessions = create_sessions(db, user_id, collection, num_sessions, num_cards) |
| 22 | create_practice_cards(db, sessions, cards) |
| 23 | return collection |
| 24 | |
| 25 | return _create |
| 26 | |
| 27 | |
| 28 | @pytest.mark.parametrize("limit", [1, 10, 30]) |
no outgoing calls
no test coverage detected