Skip to content

Commit

Permalink
Merge pull request #982 from openedx/pwnage101/update-restricted-runs…
Browse files Browse the repository at this point in the history
…-test-data

docs: update test data script for testing restricted runs
  • Loading branch information
pwnage101 authored Oct 21, 2024
2 parents 5ea87f4 + 555fc4d commit 8927251
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 8927251

Please sign in to comment.