I have httpx code that passes content to request using byte iterator. When trying the test code using pytest_httpx and match_content on mocked request, I get assertion error and the aiter_bytes is never called. Here's what I'm trying...
When I remove the match_content parameter, the test passes, but the aiter_bytes is never called. Is there anything I'm missing? I'm not sure whether this is pytest_httpx or httpx issue, although when I run the code without pytest in real program, it works and sends the data properly.
Hello team,
I have
httpx
code that passescontent
to request using byte iterator. When trying the test code usingpytest_httpx
andmatch_content
on mocked request, I get assertion error and theaiter_bytes
is never called. Here's what I'm trying...and the exception when runnning the test
When I remove the
match_content
parameter, the test passes, but theaiter_bytes
is never called. Is there anything I'm missing? I'm not sure whether this ispytest_httpx
orhttpx
issue, although when I run the code withoutpytest
in real program, it works and sends the data properly.Thank you, Adam