If these variables are used only the kwargs below, you can skip the variable declaration and use the values inline:

    self.course = CourseFactory.create(display_name='course_name', number=self.course_slug)