'Test the exceptions which preclude successful publication'

def test_exceptions(self):

    source_course = CourseLocator(org='testx', course='GreekHero', run='run', branch=BRANCH_NAME_DRAFT)
    destination_course = CourseLocator(org='fake', course='Unknown', run='run', branch=BRANCH_NAME_PUBLISHED)
    head = source_course.make_usage_key('course', 'head12345')
    chapter3 = source_course.make_usage_key('chapter', 'chapter3')
    problem1 = source_course.make_usage_key('problem', 'problem1')
    with self.assertRaises(ItemNotFoundError):
        modulestore().copy(self.user_id, source_course, destination_course, [chapter3], None)
    destination_course = CourseLocator(org='testx', course='GreekHero', run='run', branch=BRANCH_NAME_PUBLISHED)
    with self.assertRaises(ItemNotFoundError):
        modulestore().copy(self.user_id, source_course, destination_course, [chapter3], None)
    modulestore().copy(self.user_id, source_course, destination_course, [head], [chapter3])
    with self.assertRaises(ItemNotFoundError):
        modulestore().copy(self.user_id, source_course, destination_course, [problem1], [])
