A public collection containing the test course.
(db, org, course)
| 426 | |
| 427 | @pytest.fixture |
| 428 | async def collection(db, org, course): |
| 429 | """A public collection containing the test course.""" |
| 430 | c = Collection( |
| 431 | id=1, |
| 432 | name="Test Collection", |
| 433 | description="A test collection", |
| 434 | public=True, |
| 435 | org_id=org.id, |
| 436 | collection_uuid="collection_test", |
| 437 | creation_date=str(datetime.now()), |
| 438 | update_date=str(datetime.now()), |
| 439 | ) |
| 440 | db.add(c) |
| 441 | await db.commit() |
| 442 | await db.refresh(c) |
| 443 | link = CollectionCourse( |
| 444 | collection_id=c.id, |
| 445 | course_id=course.id, |
| 446 | org_id=org.id, |
| 447 | creation_date=str(datetime.now()), |
| 448 | update_date=str(datetime.now()), |
| 449 | ) |
| 450 | db.add(link) |
| 451 | await db.commit() |
| 452 | return c |
| 453 | |
| 454 | |
| 455 | # --------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected