twisted.web.test.test_agent.FakeReactorAndConnectMixin class documentationtwisted.web.test.test_agent
(View In Hierarchy)
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.
| Method | createReactor | Create a MemoryReactorClockand give it some hostnames it can resolve. | 
| Class | StubEndpoint | Endpoint that wraps existing endpoint, substitutes StubHTTPProtocol, and resulting protocol instances are attached to the given test case. | 
| Method | buildAgentForWrapperTest | 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 StubHTTPProtocolfor ease of testing. | 
Create a MemoryReactorClock
and give it some hostnames it can resolve.
| Returns | a MemoryReactorClock-like
object with a slightly limited interface (onlyadvanceandtcpClientsin addition to its formally-declared reactor 
interfaces), which can resolve a fixed set of domains. | |
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.