'Setup course structure and create user for user partition
transformer test.
Args:
active: boolean representing if the user partitions are
active or not'

def setup_partitions_and_course(self, active=True):

    self.setup_groups_partitions(active=active)
    self.user_partition = self.user_partitions[0]
    self.course_hierarchy = self.get_course_hierarchy()
    self.blocks = self.build_course(self.course_hierarchy)
    self.course = self.blocks['course']
    CourseEnrollmentFactory.create(user=self.user, course_id=self.course.id, is_active=True)
    self.setup_cohorts(self.course)
