def test_fileplugin_icon_uppercase(self):
        page = api.create_page('testpage', 'nav_playground.html', 'en')
        body = page.placeholders.get(slot="body")
        plugin = File(
            plugin_type='FilePlugin',
            placeholder=body,
            position=1,
            language=settings.LANGUAGE_CODE,
        )
        # This try/except block allows older and newer versions of the
        # djangocms-file plugin to work here.
        try:
            plugin.file.save("UPPERCASE.JPG", SimpleUploadedFile(
                "UPPERCASE.jpg", b"content"), False)
        except __HOLE__:  # catches 'RelatedObjectDoesNotExist'
            plugin.source.save("UPPERCASE.JPG", SimpleUploadedFile(
                "UPPERCASE.jpg", b"content"), False)
        plugin.add_root(instance=plugin)
        self.assertNotEquals(plugin.get_icon_url().find('jpg'), -1)
dataset/ETHPy150Open divio/django-cms/cms/tests/test_plugins.py/FileSystemPluginTests.test_fileplugin_icon_uppercase