expose the Twisted-testing internals of treq.testing
for testing things that are concurrent with HTTP requests
#227
Labels
treq.testing
for testing things that are concurrent with HTTP requests
#227
Twisted is great because you can do lots of stuff concurrently.
MemoryReactor
is great because you can test the completion of concurrent operations in memory.StubTreq
is great because it lets you do this in a super high-level idiomatic way in tests.However, these do not always play nice together. Specifically, if I have an HTTP request that kicks off some other network I/O on the back end, which might have timeouts, and I want to wrap it all together nicely in the same
MemoryReactorClock
:stub_treq.get.__wrapped__.__self__._agent._memoryReactor
is how you apparently have to scrape it out of the innards)Let's expose this in a nice way so that we have a supported & documented public way to test interactions with other subsystems within Twisted. If a web request updates a conch terminal I want to be able to test it.
The text was updated successfully, but these errors were encountered: