'Tests that the COURSE_CREATION_DISABLED flag overrides course creator group settings.'

def test_course_creation_disabled(self):

    with mock.patch.dict('django.conf.settings.FEATURES', {'DISABLE_COURSE_CREATION': True, 'ENABLE_CREATOR_GROUP': True}):
        add_users(self.admin, CourseCreatorRole(), self.user)
        self.assertFalse(user_has_role(self.user, CourseCreatorRole()))
        self.user.is_staff = True
        self.assertTrue(user_has_role(self.user, CourseCreatorRole()))
        remove_users(self.admin, CourseCreatorRole(), self.user)
        self.assertTrue(user_has_role(self.user, CourseCreatorRole()))
