# Path: buckets/fields.py
# def key_from_url(url, upload_to):
#     def __init__(self, url, field, original_url=None):
#     def _get_file(self):
#     def _set_file(self, file):
#     def _del_file(self):
#     def open(self):
#     def save(self):
#     def delete(self):
#     def __init__(self, field):
#     def __get__(self, instance, value):
#     def __set__(self, instance, value):
#     def __init__(self, upload_to='', storage=None, accepted_types=None,
#                  *args, **kwargs):
#     def get_internal_type(self):
#     def contribute_to_class(self, cls, name, **kwargs):
#     def deconstruct(self):
#     def from_db_value(self, value, expression, connection, context):
#     def to_python(self, value):
#     def get_prep_value(self, value):
#     def pre_save(self, model_instance, add):
#     def formfield(self, *args, **kwargs):
# class S3File(object):
# class S3FileDescriptor(object):
# class S3FileField(models.Field):
# 
# Path: buckets/serializers.py
# class S3Field(Field):
#     def to_internal_value(self, value):
#     def to_representation(self, value):


from buckets import fields, serializers


def test_s3_field():
    field = fields.S3FileField()
    s3_file = fields.S3File('http://example.com/file.txt', field)

    serializer_field = serializers.S3Field()

# Path: buckets/fields.py
# def key_from_url(url, upload_to):
#     def __init__(self, url, field, original_url=None):
#     def _get_file(self):
#     def _set_file(self, file):
#     def _del_file(self):
#     def open(self):
#     def save(self):
#     def delete(self):
#     def __init__(self, field):
#     def __get__(self, instance, value):
#     def __set__(self, instance, value):
#     def __init__(self, upload_to='', storage=None, accepted_types=None,
#                  *args, **kwargs):
#     def get_internal_type(self):
#     def contribute_to_class(self, cls, name, **kwargs):
#     def deconstruct(self):
#     def from_db_value(self, value, expression, connection, context):
#     def to_python(self, value):
#     def get_prep_value(self, value):
#     def pre_save(self, model_instance, add):
#     def formfield(self, *args, **kwargs):
# class S3File(object):
# class S3FileDescriptor(object):
# class S3FileField(models.Field):
# 
# Path: buckets/serializers.py
# class S3Field(Field):
#     def to_internal_value(self, value):
#     def to_representation(self, value):


# Path: tests/test_serializers.py
from buckets import fields, serializers



def test_s3_field():
    field = fields.S3FileField()
    s3_file = fields.S3File('http://example.com/file.txt', field)

    serializer_field = serializers.S3Field()

    assert serializer_field.to_internal_value(s3_file) == s3_file