'Set up tests'

def setUp(self):

    super(TestFieldOverrides, self).setUp()
    self.ccx = ccx = CustomCourseForEdX(course_id=self.course.id, display_name='Test    CCX', coach=AdminFactory.create())
    ccx.save()
    patch = mock.patch('ccx.overrides.get_current_ccx')
    self.get_ccx = get_ccx = patch.start()
    get_ccx.return_value = ccx
    self.addCleanup(patch.stop)
    self.addCleanup(RequestCache.clear_request_cache)
    inject_field_overrides(iter_blocks(ccx.course), self.course, AdminFactory.create())
    self.ccx_key = CCXLocator.from_course_locator(self.course.id, ccx.id)
    self.ccx_course = get_course_by_id(self.ccx_key, depth=None)
    def cleanup_provider_classes():
        '\n                                                After    everything    is    done,    clean    up    by    un-doing    the    change    to    the\n                                                OverrideFieldData    object    that    is    done    during    the    wrap    method.\n                                                '
        OverrideFieldData.provider_classes = None
    self.addCleanup(cleanup_provider_classes)
