-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34303 from openedx/jkantor/list-available
feat: add list endpoint for course reset enabled enrollments
- Loading branch information
Showing
5 changed files
with
420 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
""" Factories for course reset models """ | ||
import factory | ||
from factory.django import DjangoModelFactory | ||
from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory | ||
|
||
|
||
from lms.djangoapps.support.models import ( | ||
CourseResetCourseOptIn, | ||
CourseResetAudit | ||
) | ||
|
||
|
||
class CourseResetCourseOptInFactory(DjangoModelFactory): # lint-amnesty, pylint: disable=missing-class-docstring | ||
class Meta: | ||
model = CourseResetCourseOptIn | ||
|
||
course_id = None | ||
active = True | ||
|
||
|
||
class CourseResetAuditFactory(DjangoModelFactory): # lint-amnesty, pylint: disable=missing-class-docstring | ||
class Meta: | ||
model = CourseResetAudit | ||
|
||
course = factory.SubFactory(CourseResetCourseOptInFactory) | ||
course_enrollment = factory.SubFactory(CourseEnrollmentFactory) | ||
reset_by = factory.SubFactory(UserFactory) | ||
status = CourseResetAudit.CourseResetStatus.ENQUEUED | ||
completed_at = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.