'Tests that assets will similar \'displayname\' will be overwritten during export'

def test_assets_overwrite(self):

    content_store = contentstore()
    asset_displayname = 'Fake_asset.txt'
    for i in range(2):
        asset_path = 'sample_asset_{}.txt'.format(i)
        asset_key = self.course.id.make_asset_key('asset', asset_path)
        content = StaticContent(asset_key, asset_displayname, 'application/text', 'test')
        content_store.save(content)
    (assets, count) = content_store.get_all_content_for_course(self.course.id)
    self.assertEqual(count, 2)
    for asset in assets:
        self.assertEquals(asset['displayname'], asset_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(asset_displayname))
    self.assertEqual(len(exported_static_files), 1)
    shutil.rmtree(root_dir)
