def request_mock(uri, **kwargs):
    case = kwargs.get('case', True)
    status_code = kwargs.get('status_code', 200)

    path = os.path.dirname(__file__)
    parts = dict(name=uri.replace('/', '_'),
                 path=os.path.join(path, 'fixtures'),
                 case='success' if case else 'fail')
    with open('{path}/{name}.{case}.json'.format(**parts)) as handler:
        return MockResponse(handler.read(), status_code)
Returns an object similar to requests response, containins the contents of
dataset/ETHPy150Open cuducos/getgist/tests/mocks.py/request_mock