'Scenario: In a course with content groups, cohorts can be unlinked from content groups
Given I have a course with a cohort defined and content groups defined
When I view the cohort in the instructor dashboard and select settings
And I link the cohort to one of the content groups and save
Then there is a notification that my cohort has been saved
And I reload the page
And I view the cohort in the instructor dashboard and select settings
And I unlink the cohort from any content group and save
Then there is a notification that my cohort has been saved
And when I reload the page
And I view the cohort in the instructor dashboard and select settings
Then the cohort is not linked to any content group'

def test_unlink_from_content_group(self):

    self._link_cohort_to_content_group(self.cohort_name, 'Bananas')
    self.cohort_management_page.set_cohort_associated_content_group(None)
    self._verify_settings_saved_and_reload(self.cohort_name)
    self.assertEqual(None, self.cohort_management_page.get_cohort_associated_content_group())
