Tom Most
Tom Most
See also: https://github.com/twisted/treq/issues/227#issuecomment-403696969
By all means, let's do this. For testing which requires control of the reactor I have been using `HTTPClient` directly, passing it a [RequestTraversalAgent](https://treq.readthedocs.io/en/release-17.8.0/api.html#treq.testing.RequestTraversalAgent) directly. It's fortunate that so many...
#224 does the loads part of this.
It seems like you can accomplish that right now, without further changes to treq: - Use `content()` or `text()` to get the request content - Use `deferToThread()` or similar to...
@SamirPS Thanks, that is more specific than the pin I was using! Ultimately, it's because httpbin is unmaintained [since 2018](https://pypi.org/project/httpbin/#history). :disappointed: I'll fix this by pinning for the moment and...
@SamirPS Is there another implementation of httpbin? We ended up here because our integration test suite used to hit httpbin.org, but of course this required internet access and was flaky....
@SamirPS It's not — Werkzeug is used by httpbin, not treq.
@om26er Have you tried opening the file in binary mode?
Indeed, the tuples are bad. I've found wrapping `treq.testing` in a "builder" class works really well — the builder can make the test pretty succinct and also check that the...
Right now *data* + *files* does have meaning: *data* must be a dict or sequence of (param name, value) tuples. These are added to the `multipart/form-data` request body before the...