MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / collection_with_sessions

Function collection_with_sessions

backend/tests/stats/test_api.py:15–25  ·  view source on GitHub ↗
(db)

Source from the content-addressed store, hash-verified

13
14@pytest.fixture
15def 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])

Calls

no outgoing calls

Tested by

no test coverage detected