def mock_responses(resps):
    def wrapper(func):
        @responses.activate
        @functools.wraps(func)
        def wrapped(*args, **kwargs):
            for resp in resps:
                responses.add(*resp.args, **resp.kwargs)
            return func(*args, **kwargs)
        return wrapped
    return wrapper
Decorator factory to make tests more DRY. Bundles responses.activate
dataset/ETHPy150Open jmcarp/robobrowser/tests/utils.py/mock_responses