| Server IP : 62.171.151.215 / Your IP : 216.73.217.53 Web Server : nginx/1.18.0 System : Linux vmi3128365 5.15.0-176-generic #186-Ubuntu SMP Fri Mar 13 11:01:42 UTC 2026 x86_64 User : alex ( 1000) PHP Version : 8.4.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/twisted/test/__pycache__/ |
Upload File : |
o
�b� � @ sL d Z ddlmZmZ ddlmZ ddlmZ ddlm Z G dd� de �Z
dS ) z,
Tests for L{twisted.application.strports}.
� )�internet�strports)�TCP4ServerEndpoint)�Factory)�TestCasec @ s e Zd ZdZdd� Zdd� ZdS )�ServiceTestsz(
Tests for L{strports.service}.
c C s� t � }t� }d}tjdt|� ||d�}| �|tj� | �|j � | �|j
t� | �|j
j
|� | �|j|� | �|j
j|� dS )z�
L{strports.service} returns a L{StreamServerEndpointService}
constructed with an endpoint produced from
L{endpoint.serverFromString}, using the same syntax.
i9 ztcp:��reactorN)�objectr r �service�str�assertIsInstancer �StreamServerEndpointService�
assertTrue�_raiseSynchronously�endpointr �assertEqual�_port�assertIs�factory�_reactor)�selfr �aFactory� aGoodPort�svc� r �</usr/lib/python3/dist-packages/twisted/test/test_strports.py�test_service s zServiceTests.test_servicec C s, ddl m} t�dd�}| �|jj|� dS )zp
L{strports.service} will use the default reactor when none is provided
as an argument.
r r ztcp:80N)�twisted.internetr r r r r r )r �
globalReactor�aServicer r r �test_serviceDefaultReactor) s z'ServiceTests.test_serviceDefaultReactorN)�__name__�
__module__�__qualname__�__doc__r r! r r r r r s r N)r% �twisted.applicationr r �twisted.internet.endpointsr �twisted.internet.protocolr �twisted.trial.unittestr r r r r r �<module> s