patrys / httmock

A mocking library for requests
Other
468 stars 57 forks source link

Response doesn't always receive request's URL #48

Open rodrigoccurvo opened 7 years ago

rodrigoccurvo commented 7 years ago

When a mock function returns a string, the response's URL is not set with the request's. I'm not sure if this is on purpose, but it seems the request is not passed as a parameter here:

        elif isinstance(res, (text_type, binary_type)):
            return response(content=res, stream=kwargs.get('stream', False))