Reproduce:
- Perform a POST with some list data:
- Use
assert_matches_request in 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.