'Test to make sure that we have a course image in the contentstore,
then export it to ensure it gets copied to both file locations.'

@patch('xmodule.tabs.CourseTab.from_json', side_effect=mock_tab_from_json)
def test_export_course_image(self, _from_json):

    course_key = CourseKey.from_string('edX/simple/2012_Fall')
    location = course_key.make_asset_key('asset', 'images_course_image.jpg')
    self.content_store.find(location)
    root_dir = path(mkdtemp())
    self.addCleanup(shutil.rmtree, root_dir)
    export_course_to_xml(self.draft_store, self.content_store, course_key, root_dir, 'test_export')
    self.assertTrue(path((root_dir / 'test_export/static/images/course_image.jpg')).isfile())
    self.assertTrue(path((root_dir / 'test_export/static/images_course_image.jpg')).isfile())
