'Create dummy course with \'CourseFactory\' and role (instructor/staff) groups'

def _create_course_with_access_groups(self, course_location, user=None, store=ModuleStoreEnum.Type.split):

    course = CourseFactory.create(org=course_location.org, number=course_location.course, run=course_location.run, default_store=store)
    self._add_role_access_to_user(user, course.id)
    return course
