Skip to content

Commit

Permalink
docs: update test data script for testing restricted runs
Browse files Browse the repository at this point in the history
  • Loading branch information
pwnage101 committed Oct 18, 2024
1 parent d74df79 commit 555fc4d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/setup_restricted_runs_test_courses.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,19 @@
course=restricted_course_unicorn,
run=course_unicorn_run1,
)[0])

# Finally update the catalog query content filters to reflect the relationships
# =============================================================================
catalog_query.content_filter |= {
'restricted_runs_allowed': {
f'course:{course_mixed.content_key}': [course_mixed_run2.content_key],
f'course:{course_unicorn.content_key}': [course_mixed_run1.content_key],
},
}
catalog_query.save()
catalog_query_2.content_filter |= {
'restricted_runs_allowed': {
f'course:{course_mixed.content_key}': [course_mixed_run3.content_key],
},
}
catalog_query_2.save()

0 comments on commit 555fc4d

Please sign in to comment.