Open vitalbmcdonald opened 4 years ago
Thanks for reporting this issue! 🙏 And documenting the exact test scenarios.
Could you perhaps open a PR that adds these tests, which will obviously fail 👍 but it’ll make it infinitely easier for someone to fork your PR branch and apply a fix.
In the PR mention “Fixes #507” for it to link to this issue.
I’m also on leave until mid January so I’m not looking at PRs in detail until I get back to work.
After reviewing the tests it looked like there were tests in place that mimicked my own, but after some debugging and stress on my sanity, I figured out that the tests rely on session.request('POST' ...
and the bug only occurs when doing session.post
. That was a fun find.
I have created PR #508 with the tests added as requested. Let me know if this wasn't what you were looking for.
Hi, I am also encountering this issue. Would it be possible to review/merge the PR? Thanks!
When using aiohttp
json
parameter forput
orpost
methods, the resulting cassette does not record the body. Instead the body is seen as null. Aiohttp using thedata
parameter appears to work fine and requests library works as expected.Below is a script with tests for aiohttp using methods put and post with body passed in using data and json as well as similar tests for requests. Only two tests, test_aiohttp_json_post_body and test_aiohttp_json_put_body, fail.
Versions: