Пример #1
0
def validate(obj):
    """Validates a handler implementation against the ISerialize interface."""
    members = [
        'serialize',
        'deserialize',
        'get_headers',
        ]
    interface.validate(ISerialization, obj, members)
Пример #2
0
def validate(obj):
    """Validates a handler implementation against the IResponse interface."""
    members = [
        'status',
        'data',
        ]
    metas = []
    interface.validate(IResponse, obj, members, metas)
Пример #3
0
def validate(obj):
    """Validates a handler implementation against the ISerialize interface."""
    members = [
        'serialize',
        'deserialize',
        'get_headers',
        ]
    interface.validate(ISerialization, obj, members)
Пример #4
0
def validate(obj):
    """Validates a handler implementation against the IResponse interface."""
    members = [
        'status',
        'data',
    ]
    metas = []
    interface.validate(IResponse, obj, members, metas)
Пример #5
0
def validate(obj):
    """Validates a handler implementation against the IResource interface."""
    members = []
    metas = [
        'baseurl',
        'resource',
        'path',
        'request',
        ]
    interface.validate(IResource, obj, members)
Пример #6
0
def validate(obj):
    """Validates a handler implementation against the IResource interface."""
    members = [
        'filter',
    ]
    metas = [
        'baseurl',
        'resource',
        'path',
        'request',
    ]
    interface.validate(IResource, obj, members)
Пример #7
0
def validate(obj):
    """Validates a handler implementation against the IRequest interface."""
    members = [
        'add_param',
        'add_url_param',
        'add_header',
        'make_request',
        'handle_response',
        ]
    metas = [
        'response_handler',
        'serialization_handler',
        'serialize',
        'deserialize',
        ]
    interface.validate(IRequest, obj, members, metas)
Пример #8
0
def validate(obj):
    """Validates a handler implementation against the IRequest interface."""
    members = [
        'add_param',
        'add_url_param',
        'add_header',
        'make_request',
        'handle_response',
    ]
    metas = [
        'response_handler',
        'serialization_handler',
        'serialize',
        'deserialize',
    ]
    interface.validate(IRequest, obj, members, metas)
Пример #9
0
def validate(obj):
    """Validates a handler implementation against the IRequest interface."""
    members = ["add_param", "add_url_param", "add_header", "request", "handle_response"]
    metas = ["baseurl", "debug", "serialization", "serialize", "deserialize"]
    interface.validate(IRequest, obj, members, metas)