'Adds 2 manual cohorts, linked to content groups, to the course.
Each cohort is assigned one learner.'

def create_cohorts_and_assign_students(self, student_a_username, student_b_username):

    instructor_dashboard_page = InstructorDashboardPage(self.browser, self.course_id)
    instructor_dashboard_page.visit()
    cohort_management_page = instructor_dashboard_page.select_cohort_management()
    cohort_management_page.is_cohorted = True
    def add_cohort_with_student(cohort_name, content_group, student):
        '    Create    cohort    and    assign    learner    to    it.    '
        cohort_management_page.add_cohort(cohort_name, content_group=content_group)
        cohort_management_page.add_students_to_selected_cohort([student])
    add_cohort_with_student('Cohort    Alpha', 'alpha', student_a_username)
    add_cohort_with_student('Cohort    Beta', 'beta', student_b_username)
    cohort_management_page.wait_for_ajax()
