Test the I...Endpoint implementations that wrap the IReactorTCP
, IReactorSSL
, and IReactorUNIX
interfaces found in twisted.internet.endpoints
.
Class |
|
Tests for adopted socket-based stream server endpoints. |
Class |
|
Generic test methods to be mixed into all client endpoint test classes. |
Class |
|
Tests for twisted.internet.endpoints.clientFromString . |
Class |
|
Tests for connectProtocol. |
Class |
|
Generic test methods to be mixed into all endpoint test classes. |
Class |
|
A stdio.StandardIO like object that simply captures its constructor arguments. |
Class |
|
HostnameEndpoint._fallbackNameResolution defers a name resolution call to a thread. |
Class |
|
Tests for HostnameEndpoint 's constructor's encoding behavior. |
Class |
|
IPv4 resolution tests for HostnameEndpoint with MemoryReactor subclasses that do not provide IReactorPluggableNameResolver . |
Class |
|
IPv6 resolution tests for HostnameEndpoint with MemoryReactor subclasses that do not provide IReactorPluggableNameResolver . |
Class |
|
Tests for HostnameEndpoint 's string representation. |
Class |
|
Tests for the hostname based endpoints when gai returns an IPv4 and an IPv6 address, and one connection takes less time than the other. |
Class |
|
Tests for the hostname based endpoints when GAI returns no address. |
Class |
|
Tests for the hostname based endpoints when GAI returns only one (IPv4) address. |
Class |
|
Tests for the hostname based endpoints when GAI returns only one (IPv6) address. |
Class |
|
A fake IReactorProcess provider to be used in tests. |
Class |
|
A fake IProcessTransport provider to be used in tests. |
Class |
|
A netstring receiver which keeps track of the strings received. |
Class |
|
A one off factory whose buildProtocol returns None . |
Class |
|
Tests for endpoints._parseServer , the low-level parsing logic. |
Class |
|
Tests for child process endpoints. |
Class |
|
Test the behaviour of the implementation detail endpoints._ProcessEndpointTransport . |
Class |
|
An extension of RaisingMemoryReactor with task.Clock . |
Class |
|
Generic test methods to be mixed into all client endpoint test classes. |
Class |
|
Tests for twisted.internet.endpoints.serverFromString . |
Class |
|
Tests for endpoints._SimpleHostnameResolver . |
Class |
|
An IProtocolFactory whose buildProtocol always returns its specificProtocol and sets passedAddress. |
Class |
|
Tests for SSL Endpoints. |
Class |
|
Tests for twisted.internet.endpoints.clientFromString which require SSL. |
Class |
|
Unit tests for the Standard I/O endpoint string description parser. |
Class |
|
Tests for Standard I/O Endpoints |
Class |
|
An IProtocol provider. |
Class |
|
Unit tests for the systemd stream server endpoint and endpoint string description parser. |
Class |
|
Tests for TCP IPv4 Endpoints. |
Class |
|
Tests for a TCP IPv6 Client Endpoint pointed at a hostname instead of an IPv6 address literal. |
Class |
|
Tests for TCP IPv6 Endpoints. |
Class |
|
Unit tests for the TCP IPv6 stream server endpoint string description parser. |
Class |
|
Simple factory to be used both when connecting and listening. It contains two deferreds which are called back when my protocol connects and disconnects. |
Class |
|
A Protocol that implements IFileDescriptorReceiver and records how its fileDescriptorReceived method is called. |
Class |
|
A Protocol that implements IHalfCloseableProtocol and records whether its readConnectionLost and {writeConnectionLost} methods are called. |
Class |
|
A Protocol that implements IHandshakeListener and records the number of times its handshakeCompleted method has been called. |
Class |
|
Protocol whose only function is to callback deferreds on the factory when it is connected or disconnected. |
Class |
|
Tests for UnixSocket Endpoints. |
Class |
|
A wrapper factory which uppercases all strings passed through it. |
Class |
|
A wrapper protocol which uppercases all strings passed through it. |
Class |
|
Tests for _TLSClientEndpointParser . |
Class |
|
Tests for the error-reporting behavior of wrapClientTLS when pyOpenSSL is unavailable. |
Class |
|
Test the behaviour of the implementation detail _WrapIProtocol. |
Class |
|
Tests for _WrapperClientEndpoint . |
Class |
|
Test the behaviour of our ugly implementation detail _WrappingFactory. |
Exception |
|
An error which isn't really an error. |
Function | add |
For the duration of testCase, add a fake plugin to twisted.plugins which contains some sample endpoint parsers. |
Function | connection |
Given a MemoryReactor and the result of calling wrapClientTLS , extract the IOpenSSLClientConnectionCreator associated with it. |
Function | deterministic |
Create a reactor that will deterministically resolve all hostnames it is passed to the list of addresses given. |
Function | replacing |
Create a copy of the given function with the given globals substituted. |
Variable | cas |
Undocumented |
Variable | chain |
Undocumented |
Variable | escaped |
Undocumented |
Variable | escaped |
Undocumented |
Variable | escaped |
Undocumented |
Variable | escaped |
Undocumented |
Variable | escaped |
Undocumented |
Variable | no |
Undocumented |
Variable | no |
Undocumented |
Variable | pem |
Undocumented |
Variable | skip |
Undocumented |
Variable | skip |
Undocumented |
Variable | test |
Undocumented |
Variable | test |
Undocumented |
Class | _ |
Common methods for testing HostnameEndpoint against MemoryReactor instances that do not provide IReactorPluggableNameResolver . |
For the duration of testCase, add a fake plugin to twisted.plugins which contains some sample endpoint parsers.
Given a MemoryReactor
and the result of calling wrapClientTLS
, extract the IOpenSSLClientConnectionCreator
associated with it.
Implementation presently uses private attributes but could (and should) be refactored to just call .connect() on the endpoint, when HostnameEndpoint
starts directing its getaddrinfo call through the reactor it is passed somehow rather than via the global threadpool.
Parameters | |
memory | the reactor attached to the given endpoint. (Presently unused, but included so tests won't need to be modified to honor it.) |
tls | The result of calling wrapClientTLS . |
Returns | |
IOpenSSLClientConnectionCreator | the client connection creator associated with the endpoint wrapper. |
Create a reactor that will deterministically resolve all hostnames it is passed to the list of addresses given.
Parameters | |
reactor:Any object with some formally-declared interfaces (i.e. one where list(providedBy(reactor)) is not empty); usually IReactor* interfaces. | An object that we wish to add an IReactorPluggableNameResolver to. |
expected | (optional); the addresses expected to be returned for every address. If these are strings, they should be IPv4 or IPv6 literals, and they will be wrapped in IPv4Address and IPv6Address objects in the resolution result. |
host | (optional); the names (unicode) mapped to lists of addresses (str or IAddress ); in the same format as expectedAddress, which map the results for specific hostnames to addresses. |
Returns | |
A new reactor which provides all the interfaces previously provided by reactor as well as IReactorPluggableNameResolver . All name resolutions performed with its nameResolver attribute will resolve reentrantly and synchronously with the given expectedAddresses. However, it is not a complete implementation as it does not have an installNameResolver method. |
Create a copy of the given function with the given globals substituted.
The globals must already exist in the function's existing global scope.
Parameters | |
function:types.FunctionType | any function object. |
**newdict | each keyword argument should be a global to set in the new function's returned scope. |
Returns | |
a new function, like function, but with new global scope. |