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

Add form data matching in http requests #138

wants to merge 1 commit into
base: develop


None yet
1 participant
Copy link

commented Mar 18, 2019

Wanted to write some tests expecting responses to specific POSTed form data. I didn't like matching on the body text explicitly, since the form fields should mean the same regardless of the order in which they arrived.

This request adds a data={} member to when() (akin to headers and body), and tries to intelligently look at the body (URL encoded or multipart), pull out the form values, then check the resulting dictionaries for equivalence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.