'Create a fake instance of Extension from ES data.'

def fake_object(self, data):

    obj = Extension(id=data['id'])
    data['created'] = es_to_datetime(data['created'])
    data['last_updated'] = es_to_datetime(data['last_updated'])
    data['modified'] = es_to_datetime(data['modified'])
    if data['latest_public_version']:
        obj.latest_public_version = ExtensionVersion(extension=obj, id=data['latest_public_version']['id'], created=es_to_datetime(data['latest_public_version']['created']), size=data['latest_public_version'].get('size', 0), status=STATUS_PUBLIC, version=data['latest_public_version']['version'])
    self._attach_fields(obj, data, ('author', 'created', 'default_language', 'icon_hash', 'last_updated', 'modified', 'slug', 'status', 'version'))
    obj.deleted = data['is_deleted']
    obj.disabled = data['is_disabled']
    obj.uuid = data['guid']
    self._attach_translations(obj, data, ('name', 'description'))
    obj.es_data = data
    return obj
