Feature request: easy assertions on post data
See original GitHub issue@responses.activate
def foo():
responses.add(responses.POST, 'http://foo.bar')
requests.post('http://foo.bar', {'qux': 'quux'})
I would like to assert that I’ve posted qux=quux, but doing this completely well is uncomfortable (esp. if you want to be py2-3 compatible).
Ideally, I would like to do:
assert responses.calls[0].data = {'qux': 'quux'}
or something equivalent.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:7
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Automating Response Validation With Assertions In Postman
This tutorial explains the concept of assertions and tests in Postman requests. This is a powerful feature to create really robust & fast ......
Read more >Making assertions - Assertible
Assertions allow you to validate HTTP responses in your API tests. For example, a basic assertion would ensure that a request to assertible.com...
Read more >Postman: Automating Response Validation With Assertions
... This tutorial will explain the concept of assertions and tests in Postman requests. This is a powerful feature and could help to...
Read more >Getting started with Assertions | Functional Testing - SoapUI
Assertions are used to validate the message received by a TestStep during execution, usually by comparing parts of the message (or the entire...
Read more >Validating Responses with Assertions - BlazeMeter Docs
Assertions allow you to specify expected data in the response to a request made in a test run. When a test is run,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is possible today, and while we could add a million new APIs, I’m closing this to avoid noise.
Would be nice if it could “match” on body params. That way it would raise if different params were sent (nothing matched).