File: //opt/cppython/lib/python3.8/test/test_asyncio/__pycache__/test_protocols.cpython-38.pyc
U
/D�g� � @ s2 d dl Z d dl mZ d dlZG dd� de j�ZdS )� N)�mockc @ s4 e Zd Zdd� Zdd� Zdd� Zdd� Zd d
� ZdS )�ProtocolsAbsTestsc C s` t �� }t�� }| �|�|�� | �|�|�� | �|�� � | �|�� � | � t
|d�� d S �N�__dict__)r �Mock�asyncioZBaseProtocol�assertIsNone�connection_made�connection_lost�
pause_writing�resume_writing�assertFalse�hasattr��self�f�p� r �?/opt/cppython/lib/python3.8/test/test_asyncio/test_protocols.py�test_base_protocol s z$ProtocolsAbsTests.test_base_protocolc C s~ t �� }t�� }| �|�|�� | �|�|�� | �|�|�� | �|�� � | �|� � � | �|�
� � | �t|d�� d S r )
r r r ZProtocolr r r
Z
data_receivedZeof_receivedr r r
r r r r r �
test_protocol s zProtocolsAbsTests.test_protocolc C s� t �� }t�� }| �|�|�� | �|�|�� | �|�d�� | �|�d�� | �|� � � | �|�
� � | �t|d�� d S )N�d � r )
r r r ZBufferedProtocolr r r
Z
get_bufferZbuffer_updatedr r r
r r r r r �test_buffered_protocol s z(ProtocolsAbsTests.test_buffered_protocolc C sf t �� }t�� }| �|�|�� | �|�|�� | �|�|�� | �|�||�� | � t
|d�� d S r )r r r ZDatagramProtocolr r r
Zerror_receivedZdatagram_receivedr
r )r r Zdpr r r �test_datagram_protocol( s z(ProtocolsAbsTests.test_datagram_protocolc C sv t �� }t�� }| �|�|�� | �|�|�� | �|�d|�� | �|�d|�� | �|� � � | �
t|d�� d S )N� r )r r r ZSubprocessProtocolr r r
Zpipe_data_receivedZpipe_connection_lostZprocess_exitedr
r )r r �spr r r �test_subprocess_protocol1 s z*ProtocolsAbsTests.test_subprocess_protocolN)�__name__�
__module__�__qualname__r r r r r r r r r r s
r )Zunittestr r ZTestCaser r r r r �<module> s