File: D:/Python311/Lib/test/test_asyncio/__pycache__/test_sslproto.cpython-311.pyc
�
��Vc�j � �T � d Z ddlZddlZddlZddlZddlmZ ddlmZ ddlZn
# e $ r dZY nw xY wddl
Z
ddl
mZ ddl
mZ ddl
m
Z
ddlmZ dd lmZ d
� Z ej edu d� � G d� d
ej � � � � Z G d� dej � � Z ej edu d� � G d� deej � � � � Z ej edu d� � ej ee
d� � d� � G d� deej � � � � � � Zedk r ej � � dS dS )zTests for asyncio/sslproto.py.� N)�support)�mock)�log)� protocols)�sslproto)�utils)�
functionalc �. � t j d � � d S �N)�asyncio�set_event_loop_policy� � �3D:\Python311\Lib\test\test_asyncio\test_sslproto.py�tearDownModuler s � ��!�$�'�'�'�'�'r z
No ssl modulec �t � � e Zd Z� fd�Zddd�d�Zdd�d�Zd� Zd� Zd � Zd
� Z d� Z
d� Zd
� Zd� Z
d� Zd� Z� xZS )�SslProtoHandshakeTestsc � �� t � � � � � t j � � | _ | � | j � � d S r )�super�setUpr �new_event_loop�loop�set_event_loop)�self� __class__s �r r zSslProtoHandshakeTests.setUp s@ �� �
���
�
�����*�,�,�� ����D�I�&�&�&�&�&r N)�waiter�protoc �* � t j � � }|�t j � � }t j | j |||d�� � }| � |j � � � |� � | �
|j j � � |S )Ng�������?��ssl_handshake_timeout)�
test_utils�dummy_ssl_contextr �Protocolr �SSLProtocolr �assertIs�_app_transport�get_protocol�
addCleanup�close)r r r �
sslcontext� ssl_protos r �ssl_protocolz#SslProtoHandshakeTests.ssl_protocol"