HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/twisted/words/test/__pycache__/test_xmpproutertap.cpython-310.pyc
o

�bX	�@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)�XMPPRouterTapTestscC�*t��}|�ddg�|�|dd�dS)z?
        The port option is recognised as a parameter.
        z--port�7001�portN��tap�Options�parseOptions�assertEqual��self�opt�r�G/usr/lib/python3/dist-packages/twisted/words/test/test_xmpproutertap.py�	test_port�zXMPPRouterTapTests.test_portcCs&t��}|�g�|�|dd�dS)z=
        The port option has '5347' as default value
        r	ztcp:5347:interface=127.0.0.1Nr
rrrr�test_portDefault�
z#XMPPRouterTapTests.test_portDefaultcCr)zA
        The secret option is recognised as a parameter.
        z--secret�hushhush�secretNr
rrrr�test_secretrzXMPPRouterTapTests.test_secretcCs&t��}|�g�|�|dd�dS)zA
        The secret option has 'secret' as default value
        rNr
rrrr�test_secretDefault'rz%XMPPRouterTapTests.test_secretDefaultcCs&t��}|�dg�|�|d�dS)z=
        The verbose option is recognised as a flag.
        �	--verbose�verboseN)rrr
�
assertTruerrrr�test_verbose/s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)rrr
�makeService�assertIsInstancer�StreamServerEndpointServicer�endpoint�
_interface�_port�factoryr�XMPPComponentServerFactory�router�Routerr�assertFalse�
logTraffic)rr�sr&rrr�test_makeService7s

z#XMPPRouterTapTests.test_makeServicecCs0t��}|�dg�t�|�}|�|jj�dS)z;
        The verbose flag enables traffic logging.
        rN)rrr
r rr&r+)rrr,rrr�test_makeServiceVerboseGs
z*XMPPRouterTapTests.test_makeServiceVerboseN)
�__name__�
__module__�__qualname__rrrrrr-r.rrrrrsrN)�__doc__�twisted.applicationr�
twisted.trialr�
twisted.wordsrr�twisted.words.protocols.jabberr�TestCaserrrrr�<module>s