'Set up tests'

def setUp(self):

    super(TestCCXGrades, self).setUp()
    self.coach = coach = AdminFactory.create()
    self.client.login(username=coach.username, password='test')
    role = CourseCcxCoachRole(self._course.id)
    role.add_users(coach)
    ccx = CcxFactory(course_id=self._course.id, coach=self.coach)
    override_field_for_ccx(ccx, self._course, 'grading_policy', {'GRADER': [{'drop_count': 0, 'min_count': 2, 'short_label': 'HW', 'type': 'Homework', 'weight': 1}], 'GRADE_CUTOFFS': {'Pass': 0.75}})
    override_field_for_ccx(ccx, self.sections[(-1)], 'visible_to_staff_only', True)
    self.ccx_key = CCXLocator.from_course_locator(self._course.id, unicode(ccx.id))
    self.course = get_course_by_id(self.ccx_key, depth=None)
    setup_students_and_grades(self)
    self.client.login(username=coach.username, password='test')
    self.addCleanup(RequestCache.clear_request_cache)
    from xmodule.modulestore.django import SignalHandler
    SignalHandler.course_published.send(sender=ccx, course_key=self.ccx_key)
