'Set up tests'

def setUp(self):

    super(CcxRestApiTest, self).setUp()
    self.master_course_key = self.course.location.course_key
    self.master_course_key_str = unicode(self.master_course_key)
    self.app_user = app_user = UserFactory(username='test_app_user', email='test_app_user@openedx.org', password=USER_PASSWORD)
    CourseStaffRole(self.master_course_key).add_users(app_user)
    instructor = UserFactory()
    allow_access(self.course, instructor, 'instructor')
    (self.auth, self.auth_header_oauth2_provider) = self.prepare_auth_token(app_user)
    self.course.enable_ccx = True
    self.mstore.update_item(self.course, self.coach.id)
    self.master_course_chapters = get_course_chapters(self.master_course_key)
