Provide mock with a Request, not PreparedRequest
simon-weber opened this issue · comments
Providing a Request instead of a PreparedRequest would make complicated mocking much easier: Request basically holds the kwargs to requests.method, while PreparedRequest only stores encoded versions of the kwargs.
For example, if you'd like to replay request params (maybe when testing an OAuth flow), PreparedRequest requires reparsing request.path_url
, while Request would provide request.params
directly.
Would you like to provide a patch for that?
If you don't want to, I'll get to it eventually =)
Fixed: #30
❤️