'Make sure cohorts.get_cohort() does the right thing.
If there are not auto cohorts then a user should be assigned to Default Cohort Group.
Also verifies that cohort config changes on studio/moduletore side will
not be reflected on lms after the migrations are done.'

def test_cohorting_with_no_auto_cohorts(self):

    course = modulestore().get_course(self.toy_course_key)
    self.assertFalse(cohorts.is_course_cohorted(course.id))
    user1 = UserFactory(username='test', email='a@b.com')
    user2 = UserFactory(username='test2', email='a2@b.com')
    config_course_cohorts(course, is_cohorted=True, auto_cohorts=[])
    self.assertEquals(cohorts.get_cohort(user1, course.id).id, cohorts.get_cohort_by_name(course.id, cohorts.DEFAULT_COHORT_NAME).id, 'No    groups->default    cohort    for    user1')
    config_course_cohorts_legacy(course, cohorted=True, auto_cohort_groups=['AutoGroup'])
    self.assertEquals(cohorts.get_cohort(user1, course.id).name, cohorts.get_cohort_by_name(course.id, cohorts.DEFAULT_COHORT_NAME).name, 'user1    should    still    be    in    the    default    cohort')
    self.assertEquals(cohorts.get_cohort(user2, course.id).id, cohorts.get_cohort_by_name(course.id, cohorts.DEFAULT_COHORT_NAME).id, 'No    groups->default    cohort    for    user2')
