# Path: mfr/core/provider.py
# class ProviderMetadata:
# 
#     def __init__(self, name, ext, content_type, unique_key, download_url, stable_id=None):
#         self.name = name
#         self.ext = ext
#         self.content_type = content_type
#         self.unique_key = unique_key
#         self.download_url = download_url
#         self.stable_id = stable_id
# 
#     def serialize(self):
#         return {
#             'name': self.name,
#             'ext': self.ext,
#             'content_type': self.content_type,
#             'unique_key': str(self.unique_key),
#             'download_url': str(self.download_url),
#             'stable_id': None if self.stable_id is None else str(self.stable_id),
#         }
# 
# Path: mfr/extensions/image/settings.py
# EXPORT_TYPE = config.get('EXPORT_TYPE', 'jpeg')
# EXPORT_MAXIMUM_SIZE = config.get('EXPORT_MAXIMUM_SIZE', '2400x2400')
# EXPORT_EXCLUSIONS = config.get('EXPORT_EXCLUSIONS', '.gif .ico').split(' ')
# EXPORT_BACKGROUND_COLOR = config.get('EXPORT_BACKGROUND_COLOR', 'white')


import pytest
import furl
from mfr.core.provider import ProviderMetadata
from mfr.extensions.image import ImageRenderer
from mfr.extensions.image import settings





class TestImageRenderer:

    def test_render_image_no_export(self):
        settings.EXPORT_TYPE_MAP = {}
        settings.EXPORT_MAXIMUM_SIZE = None
        settings.EXPORT_TYPE = None

        url = 'http://osf.io/file/test.png'


# Path: mfr/core/provider.py
# class ProviderMetadata:
# 
#     def __init__(self, name, ext, content_type, unique_key, download_url, stable_id=None):
#         self.name = name
#         self.ext = ext
#         self.content_type = content_type
#         self.unique_key = unique_key
#         self.download_url = download_url
#         self.stable_id = stable_id
# 
#     def serialize(self):
#         return {
#             'name': self.name,
#             'ext': self.ext,
#             'content_type': self.content_type,
#             'unique_key': str(self.unique_key),
#             'download_url': str(self.download_url),
#             'stable_id': None if self.stable_id is None else str(self.stable_id),
#         }
# 
# Path: mfr/extensions/image/settings.py
# EXPORT_TYPE = config.get('EXPORT_TYPE', 'jpeg')
# EXPORT_MAXIMUM_SIZE = config.get('EXPORT_MAXIMUM_SIZE', '2400x2400')
# EXPORT_EXCLUSIONS = config.get('EXPORT_EXCLUSIONS', '.gif .ico').split(' ')
# EXPORT_BACKGROUND_COLOR = config.get('EXPORT_BACKGROUND_COLOR', 'white')


# Path: tests/extensions/image/test_renderer.py
import pytest
import furl
from mfr.core.provider import ProviderMetadata
from mfr.extensions.image import ImageRenderer
from mfr.extensions.image import settings






class TestImageRenderer:

    def test_render_image_no_export(self):
        settings.EXPORT_TYPE_MAP = {}
        settings.EXPORT_MAXIMUM_SIZE = None
        settings.EXPORT_TYPE = None

        url = 'http://osf.io/file/test.png'


        metadata = ProviderMetadata('test', '.png', 'text/plain', '1234', 'http://wb.osf.io/file/test.png?token=1234')