HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/twisted/words/test/__pycache__/test_xmpproutertap.cpython-38.pyc
U


W[^	�@sJdZddlmZddlmZddlmZddlm	Z	Gdd�dej
�ZdS)	z+
Tests for L{twisted.words.xmpproutertap}.
�)�internet)�unittest)�
xmpproutertap)�	componentc@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�XMPPRouterTapTestscCs*t��}|�ddg�|�|dd�dS)z?
        The port option is recognised as a parameter.
        z--portZ7001�portN��tap�Options�parseOptions�assertEqual��self�opt�r�G/usr/lib/python3/dist-packages/twisted/words/test/test_xmpproutertap.py�	test_portszXMPPRouterTapTests.test_portcCs&t��}|�g�|�|dd�dS)z=
        The port option has '5347' as default value
        rztcp:5347:interface=127.0.0.1Nrr
rrr�test_portDefaults
z#XMPPRouterTapTests.test_portDefaultcCs*t��}|�ddg�|�|dd�dS)zA
        The secret option is recognised as a parameter.
        z--secretZhushhush�secretNrr
rrr�test_secret!szXMPPRouterTapTests.test_secretcCs&t��}|�g�|�|dd�dS)zA
        The secret option has 'secret' as default value
        rNrr
rrr�test_secretDefault*s
z%XMPPRouterTapTests.test_secretDefaultcCs&t��}|�dg�|�|d�dS)z=
        The verbose option is recognised as a flag.
        �	--verbose�verboseN)r	r
r�
assertTruer
rrr�test_verbose3szXMPPRouterTapTests.test_verbosecCs�t��}|�g�t�|�}|�|tj�|�d|jj	�|�d|jj
�|j}|�|tj
�|�|jtj�|�d|j�|�|j�dS)zD
        The service gets set up with a router and factory.
        z	127.0.0.1i�rN)r	r
r�makeServiceZassertIsInstancerZStreamServerEndpointServicerZendpointZ
_interfaceZ_port�factoryrZXMPPComponentServerFactoryZrouterZRouterrZassertFalse�
logTraffic)rr�srrrr�test_makeService<s

z#XMPPRouterTapTests.test_makeServicecCs0t��}|�dg�t�|�}|�|jj�dS)z;
        The verbose flag enables traffic logging.
        rN)r	r
rrrrr)rrrrrr�test_makeServiceVerboseMs
z*XMPPRouterTapTests.test_makeServiceVerboseN)
�__name__�
__module__�__qualname__rrrrrrr rrrrr
s					rN)�__doc__Ztwisted.applicationrZ
twisted.trialrZ
twisted.wordsrr	Ztwisted.words.protocols.jabberrZTestCaserrrrr�<module>s