← Back
Editing: test_protocols.cpython-38.pyc
U W[ � @ s� d Z ddlmZ ddlmZmZ ddlmZ ddlm Z m Z mZmZ ddl mZ G dd� dej�ZG d d � d ej�ZG dd� dej�ZG d d� dej�ZG dd� dej�ZdS )z+ Test cases for twisted.protocols package. � )�unittest)�wire�portforward)� iterbytes)�reactor�defer�address�protocol)� proto_helpersc @ s0 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd S )� WireTestsz Test wire protocols. c C s` t �� }t�� }|�|� |�d� |�d� |�d� |�d� |�d� | �|�� d� dS )zT Test wire.Echo protocol: send some data and check it send it back. � hello� world� how� are� yous helloworldhowareyouN)r �StringTransportr �Echo�makeConnection�dataReceived�assertEqual�value��self�t�a� r �=/usr/lib/python3/dist-packages/twisted/test/test_protocols.py� test_echo s zWireTests.test_echoc C s. t �� }t�� }|�|� | �|�� d� dS )z) Test wire.Who protocol. s root N)r r r ZWhor r r r r r r �test_who# s zWireTests.test_whoc C s. t �� }t�� }|�|� | �|�� d� dS )z* Test wire.QOTD protocol. s'