Fixup CourseEnrollmentFactory
Historically, the CourseEnrollment model used to have a `course_id` field. A lot of tests still call the factory using that. Instead of a `course_id` field this model now has a `course` field which is a foreign key to the CourseOverview model. The factory still accepts the course_id but uses it to create the relevant CourseOverview object where necessary. This commit fixes two issues with the factory. 1. If the course id is passed in as`course_id` instead of `course__id` then, the generated CourseOverview does not have the correct course_id. 2. Even though the CourseEnrollment model no longer needs the `course_id` parameter, we were still passing it through. We now remove it so that it is not passed through to the CourseEnrollment model instantiation.
Please register or sign in to comment