-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨(edx) add entries deletion from student_courseenrollmentallowed
Introduces functionality to manually query and delete entries from the `student_courseenrollmentallowed` table, as it lacks foreign key relationships with other tables.
- Loading branch information
Showing
2 changed files
with
20 additions
and
4 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 |
---|---|---|
|
@@ -16,6 +16,9 @@ | |
EdxCourseCreatorsCoursecreatorFactory, | ||
) | ||
from mork.edx.factories.dark import EdxDarkLangDarklangconfigFactory | ||
from mork.edx.factories.student import ( | ||
EdxStudentCourseenrollmentallowedFactory, | ||
) | ||
from mork.edx.factories.util import EdxUtilRatelimitconfigurationFactory | ||
from mork.edx.factories.verify import ( | ||
EdxVerifyStudentHistoricalverificationdeadlineFactory, | ||
|
@@ -155,9 +158,10 @@ def test_edx_crud_delete_user_missing(edx_db): | |
|
||
def test_edx_crud_delete_user(edx_db): | ||
"""Test the `delete_user` method.""" | ||
EdxAuthUserFactory.create_batch( | ||
1, email="[email protected]", username="john_doe" | ||
) | ||
email = "[email protected]" | ||
username = "john_doe" | ||
EdxAuthUserFactory.create_batch(1, email=email, username=username) | ||
EdxStudentCourseenrollmentallowedFactory.create_batch(3, email=email) | ||
|
||
# Get all related tables that have foreign key constraints on the parent table | ||
related_tables = [ | ||
|
@@ -183,6 +187,7 @@ def test_edx_crud_delete_user(edx_db): | |
"student_anonymoususerid", | ||
"student_courseaccessrole", | ||
"student_courseenrollment", | ||
"student_courseenrollmentallowed", | ||
"student_courseenrollmentattribute", | ||
"student_historicalcourseenrollment", | ||
"student_languageproficiency", | ||
|