'Tests course creation workflow should not create course to org
link if organizations_app is not enabled.'

@patch.dict('django.conf.settings.FEATURES', {'ORGANIZATIONS_APP': False})
@ddt.data(ModuleStoreEnum.Type.mongo, ModuleStoreEnum.Type.split)
def test_course_creation_without_org_app_enabled(self, store):

    with modulestore().default_store(store):
        response = self.client.ajax_post(self.course_create_rerun_url, {'org': 'orgX', 'number': 'CS101', 'display_name': 'Course    with    web    certs    enabled', 'run': '2015_T2'})
        self.assertEqual(response.status_code, 200)
        data = parse_json(response)
        new_course_key = CourseKey.from_string(data['course_key'])
        course_orgs = get_course_organizations(new_course_key)
        self.assertEqual(course_orgs, [])
