-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Reproduce:
- Perform a POST with some list data:
{'foo': ['1', '2']}
- Use
assert_matches_requestin your test - See that it fails on:
nose.proxy.AssertionError: '2' != "['1', '2']"
- 2
+ ['1', '2']
Why?
self.assert_data_equal(wsgi_request.POST, sample_request['body'])
The comparison fails due to the fact that request['foo'] is '2' (as opposed to request.getlist('foo') which is ['1', '2'])
Some cleverness in assert_matches_request may need to happen to create an accurate dict based on what the sample request indicates is in the payload.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels