'If the VerifiedTrackCohortedCourse feature is enabled for a course, but the course is not cohorted,
an error is logged and enrollment mode changes do not move learners into a cohort.'

@mock.patch('openedx.core.djangoapps.verified_track_content.models.log.error')
def test_cohorting_enabled_course_not_cohorted(self, error_logger):

    self._enable_verified_track_cohorting()
    self.assertTrue(VerifiedTrackCohortedCourse.is_verified_track_cohort_enabled(self.course.id))
    self._verify_no_automatic_cohorting()
    self.assertTrue(error_logger.called)
    self.assertIn('course    is    not    cohorted', error_logger.call_args[0][0])
