class TLSPortTestsBuilder(TLSMixin, ContextGeneratingMixin, BadContextTestsMixin, ConnectToTCPListenerMixin, StreamTransportTestsMixin, ReactorBuilder): (source)
Tests for IReactorSSL.listenSSL
Method | connect |
Connect to the given listening TLS port, assuming the underlying transport is TCP. |
Method | get |
Get the expected connection lost message for a TLS port. |
Method | get |
Get the message expected to be logged when a TLS port starts listening. |
Method | get |
Get a TLS port from a reactor. |
Method | test_bad |
If the context factory passed to IReactorSSL.listenSSL raises an exception from its getContext method, that exception is raised by IReactorSSL.listenSSL . |
Inherited from TLSMixin
:
Class Variable | msg |
Undocumented |
Class Variable | required |
Undocumented |
Class Variable | skipped |
Undocumented |
Inherited from ContextGeneratingMixin
(via TLSMixin
):
Method | get |
Undocumented |
Method | get |
Return a new SSL context suitable for use in a test server. |
Class Variable | _pem |
Undocumented |
Inherited from BadContextTestsMixin
(via TLSMixin
, ContextGeneratingMixin
):
Method | _test |
Assert that the exception raised by a broken context factory's getContext method is raised by some reactor method. If it is not, an exception will be raised to fail the test. |
Inherited from ConnectToTCPListenerMixin
(via TLSMixin
, ContextGeneratingMixin
, BadContextTestsMixin
):
Constant | LISTENER |
The host on which the port is expected to be listening. This is specific to avoid compatibility issues with Windows, which cannot connect to the wildcard host. |
Inherited from StreamTransportTestsMixin
(via TLSMixin
, ContextGeneratingMixin
, BadContextTestsMixin
, ConnectToTCPListenerMixin
):
Method | test_close |
See assertPeerClosedOnEMFILE . |
Method | test_connection |
When a connection is lost, an informative message should be logged (see getExpectedConnectionLostLogMsg ): an address identifying the port and the fact that it was closed. |
Method | test_started |
When a port starts, a message including a description of the associated factory is logged. |
Inherited from LogObserverMixin
(via TLSMixin
, ContextGeneratingMixin
, BadContextTestsMixin
, ConnectToTCPListenerMixin
, StreamTransportTestsMixin
):
Method | observe |
Undocumented |
Inherited from ReactorBuilder
(via TLSMixin
, ContextGeneratingMixin
, BadContextTestsMixin
, ConnectToTCPListenerMixin
, StreamTransportTestsMixin
, LogObserverMixin
):
Class Method | make |
Create a SynchronousTestCase subclass which mixes in cls for each known reactor and return a dict mapping their names to them. |
Method | build |
Create and return a reactor using self.reactorFactory. |
Method | get |
Determine how long to run the test before considering it failed. |
Method | run |
Run the reactor for at most the given amount of time. |
Method | set |
Clear the SIGCHLD handler, if there is one, to ensure an environment like the one which exists prior to a call to reactor.run . |
Method | tear |
Restore the original SIGCHLD handler and reap processes as long as there seem to be any remaining. |
Method | unbuild |
Clean up any resources which may have been allocated for the given reactor by its creation or by a test which used it. |
Instance Variable | original |
The SIGCHLD handler which was installed when setUp ran and which will be re-installed when tearDown runs. |
Instance Variable | reactor |
A no-argument callable which returns the reactor to use for testing. |
Instance Variable | _reactors |
A list of FQPN strings giving the reactors for which SynchronousTestCase s will be created. |
Connect to the given listening TLS port, assuming the underlying transport is TCP.
Parameters | |
reactor:IReactorSSL | The reactor under test. |
address:IPv4Address or IPv6Address | The listening's address. Only the port component is used; see ConnectToTCPListenerMixin.LISTENER_HOST . |
factory:ClientFactory | The client factory. |
Returns | |
The connector |
If the context factory passed to IReactorSSL.listenSSL
raises an exception from its getContext method, that exception is raised by IReactorSSL.listenSSL
.