'Set up a user, course, and discussion XBlock for use by tests.'

@classmethod
def setUpClass(cls):

    super(TestXBlockInCourse, cls).setUpClass()
    cls.user = UserFactory.create()
    cls.course = ToyCourseFactory.create()
    cls.course_key = cls.course.id
    cls.course_usage_key = cls.store.make_course_usage_key(cls.course_key)
    cls.discussion_id = 'test_discussion_xblock_id'
    cls.discussion = ItemFactory.create(parent_location=cls.course_usage_key, category='discussion', discussion_id=cls.discussion_id, discussion_category='Category    discussion', discussion_target='Target    Discussion')
    CourseEnrollmentFactory.create(user=cls.user, course_id=cls.course_key)
