-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support files= in StubTreq #250
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently if you specify a
files=
argument toStubTreq
, it complains that this is not supported.The reason it's not supported is that
HTTPClient.request
, when given afiles=
argument, will construct atreq.multipart.MultiPartProducer
without giving it acooperator=
argument; the default value forcooperator=
istwisted.internet.task
, which populatesMultiPartProducer._cooperate
withtwisted.internet.task.cooperate
, which implicitly references the global reactor.It should be possible to push down a
Cooperator
object throughHTTPClient
so that the instantiatedMultiPartProducer
can use the passed in one. (Given thatCooperator
is itself a stateful scheduler, it's not quite enough just to pass anIReactorTime
.)The text was updated successfully, but these errors were encountered: