| Server IP : 138.197.176.125 / Your IP : 216.73.217.54 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/twisted/internet/test/__pycache__/ |
Upload File : |
U
W[% � @ s" d Z ddlmZmZ ddlmZ ddlmZ ddlm Z ddl
mZmZ ddl
mZmZ ddl
mZ dd l
mZ dd
lmZ zddlmZ ddlmZ W n ek
r� d
ZY nX ddlmZ G dd� dej�ZG dd� de�Zeej�G dd� de��ZG dd� de ee�Z e!� �"e �#� � d
S )z(
Tests for L{twisted.internet._newtls}.
� )�division�absolute_import)�unittest)�
interfaces)�ReactorBuilder)�ConnectableProtocol�runProtocolsWithReactor)�
SSLCreator�TLSMixin)�StartTLSClientCreator)�ContextGeneratingMixin)�
TCPCreator)�tls)�_newtlsN)�implementerc @ s e Zd ZdZesdZdd� ZdS )�BypassTLSTestsz4
Tests for the L{_newtls._BypassTLS} class.
z<Couldn't import _newtls, perhaps pyOpenSSL is old or missingc sh t � � g �G � �fdd�dt �}t�||� �}|�� | ��� g� t � }|�|� | ��� |g� dS )z�
C{_BypassTLS.loseConnection} calls C{loseConnection} on the base
class, while preserving any default argument in the base class'
C{loseConnection} implementation.
c s e Zd Z� f�fdd� ZdS )zDBypassTLSTests.test_loseConnectionPassThrough.<locals>.FakeTransportc s � � |� d S �N)�append)�selfZ _connDone)�result� �C/usr/lib/python3/dist-packages/twisted/internet/test/test_newtls.py�loseConnection- s zSBypassTLSTests.test_loseConnectionPassThrough.<locals>.FakeTransport.loseConnectionN)�__name__�
__module__�__qualname__r r ��defaultr r r �
FakeTransport, s r N)�objectr Z
_BypassTLSr �assertEqual)r r ZbypassZ
notDefaultr r r �test_loseConnectionPassThrough# s
z-BypassTLSTests.test_loseConnectionPassThroughN)r r r �__doc__r �skipr! r r r r r s r c @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �FakeProducerz'
A producer that does nothing.
c C s d S r r �r r r r �pauseProducingB s zFakeProducer.pauseProducingc C s d S r r r% r r r �resumeProducingF s zFakeProducer.resumeProducingc C s d S r r r% r r r �
stopProducingJ s zFakeProducer.stopProducingN)r r r r"