# Path: integration_tests/strategies.py



from integration_tests import strategies as st
from hypothesis.strategies import SearchStrategy


def makeval(v, default_st, default=None):
    if isinstance(v, SearchStrategy):
        return v.example()

    if v is True:
        return default_st.example()

    if v is not None:
        return v

    return default


def print_request(request):
    body = request['body']
    if body:
        if isinstance(body, list):
            body = '{} chunks'.format(len(body))
        else:
            if len(body) > 32:
                body = body[:32] + b'...'
    print(repr(request['method']), repr(request['path']),
          repr(request['query_string']), body)


def generate_request(*, method=None, path=None, query_string=None,
                     headers=None, body=None, size_k=None):
    request = {}

# Path: integration_tests/strategies.py



# Path: integration_tests/generators.py
from integration_tests import strategies as st
from hypothesis.strategies import SearchStrategy



def makeval(v, default_st, default=None):
    if isinstance(v, SearchStrategy):
        return v.example()

    if v is True:
        return default_st.example()

    if v is not None:
        return v

    return default


def print_request(request):
    body = request['body']
    if body:
        if isinstance(body, list):
            body = '{} chunks'.format(len(body))
        else:
            if len(body) > 32:
                body = body[:32] + b'...'
    print(repr(request['method']), repr(request['path']),
          repr(request['query_string']), body)


def generate_request(*, method=None, path=None, query_string=None,
                     headers=None, body=None, size_k=None):
    request = {}

    request['method'] = makeval(method,  st.method, 'GET')