class FakeReactorAndConnectMixin: (source)
Known subclasses: twisted.web.test.test_agent.AgentHTTPSTests
, twisted.web.test.test_agent.AgentMethodInjectionTests
, twisted.web.test.test_agent.AgentTests
, twisted.web.test.test_agent.AgentURIInjectionTests
, twisted.web.test.test_agent.BrowserLikeRedirectAgentTests
, twisted.web.test.test_agent.ContentDecoderAgentTests
, twisted.web.test.test_agent.ContentDecoderAgentWithGzipTests
, twisted.web.test.test_agent.CookieAgentTests
, twisted.web.test.test_agent.HTTPConnectionPoolRetryTests
, twisted.web.test.test_agent.HTTPConnectionPoolTests
, twisted.web.test.test_agent.ProxyAgentTests
, twisted.web.test.test_agent.RedirectAgentTests
A test mixin providing a testable Reactor class and a dummy connect method which allows instances to pretend to be endpoints.
Class |
|
Endpoint that wraps existing endpoint, substitutes StubHTTPProtocol, and resulting protocol instances are attached to the given test case. |
Method | build |
Return an Agent suitable for use in tests that wrap the Agent and want both a fake reactor and StubHTTPProtocol. |
Method | connect |
Fake implementation of an endpoint which synchronously succeeds with an instance of StubHTTPProtocol for ease of testing. |
Method | create |
Create a MemoryReactorClock and give it some hostnames it can resolve. |
Instance Variable | protocol |
Undocumented |
Return an Agent suitable for use in tests that wrap the Agent and want both a fake reactor and StubHTTPProtocol.
Fake implementation of an endpoint which synchronously succeeds with an instance of StubHTTPProtocol
for ease of testing.
Create a MemoryReactorClock
and give it some hostnames it can resolve.
Returns | |
a MemoryReactorClock -like object with a slightly limited interface (only advance and tcpClients in addition to its formally-declared reactor interfaces), which can resolve a fixed set of domains. |