Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide mock with a Request, not PreparedRequest #16

Closed
simon-weber opened this issue Feb 9, 2014 · 4 comments
Closed

Provide mock with a Request, not PreparedRequest #16

simon-weber opened this issue Feb 9, 2014 · 4 comments

Comments

@simon-weber
Copy link
Contributor

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.

@patrys
Copy link
Owner

patrys commented Feb 10, 2014

Would you like to provide a patch for that?

@simon-weber
Copy link
Contributor Author

If you don't want to, I'll get to it eventually =)

@dummerbd
Copy link
Contributor

Fixed: #30

@simon-weber
Copy link
Contributor Author

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants