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

Function _create

backend/tests/stats/test_services.py:42–49  ·  view source on GitHub ↗
(user_id, num_cards=5, num_sessions=10)

Source from the content-addressed store, hash-verified

40@pytest.fixture
41def collection_with_sessions(db, test_user: dict[str, Any]):
42 def _create(user_id, num_cards=5, num_sessions=10):
43 collection = Collection(name="Test Collection", user_id=user_id)
44 db.add(collection)
45 db.flush()
46 cards = create_cards(db, collection, num_cards)
47 sessions = create_sessions(db, user_id, collection, num_sessions, num_cards)
48 create_practice_cards(db, sessions, cards)
49 return collection
50
51 collection_out = _create(user_id=test_user["id"])
52

Callers 1

collection_with_sessionsFunction · 0.70

Calls 4

CollectionClass · 0.90
create_cardsFunction · 0.90
create_sessionsFunction · 0.90
create_practice_cardsFunction · 0.90

Tested by

no test coverage detected