'Make sure that if a non-default image path is specified that we
don\'t export it to the static default location'

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

    course = self.draft_store.get_course(CourseKey.from_string('edX/toy/2012_Fall'))
    assert_true(course.course_image, 'just_a_test.jpg')
    root_dir = path(mkdtemp())
    self.addCleanup(shutil.rmtree, root_dir)
    export_course_to_xml(self.draft_store, self.content_store, course.id, root_dir, 'test_export')
    self.assertTrue(path((root_dir / 'test_export/static/just_a_test.jpg')).isfile())
    self.assertFalse(path((root_dir / 'test_export/static/images/course_image.jpg')).isfile())
