'Tests that assets with invalid \'displayname\' does not cause export to fail'

@ddt.data('/Fake/asset/displayname', '\\Fake\\asset\\displayname')
def test_export_on_invalid_displayname(self, invalid_displayname):

    content_store = contentstore()
    exported_asset_name = '_Fake_asset_displayname'
    asset_key = self.course.id.make_asset_key('asset', 'fake_asset.txt')
    content = StaticContent(asset_key, invalid_displayname, 'application/text', 'test')
    content_store.save(content)
    (assets, count) = content_store.get_all_content_for_course(self.course.id)
    self.assertEqual(count, 1)
    display_name = assets[0]['displayname']
    self.assertEqual(display_name, invalid_displayname)
    root_dir = path(mkdtemp_clean())
    print 'Exporting    to    tempdir    =    {0}'.format(root_dir)
    export_course_to_xml(self.store, content_store, self.course.id, root_dir, 'test_export')
    filesystem = OSFS((root_dir / 'test_export/static'))
    exported_static_files = filesystem.listdir()
    self.assertTrue(filesystem.exists(exported_asset_name))
    self.assertEqual(len(exported_static_files), 1)
    shutil.rmtree(root_dir)
