a  zeüã@s2ddlZddlmZddlZGdd„dejƒZdS)éN)Úmockc@s4eZdZdd„Zdd„Zdd„Zdd„Zd d „Zd S) ÚProtocolsAbsTestscCs`t ¡}t ¡}| | |¡¡| | |¡¡| | ¡¡| | ¡¡|  t |dƒ¡dS©NÚ__dict__) rÚMockÚasyncioZ BaseProtocolÚ assertIsNoneÚconnection_madeÚconnection_lostÚ pause_writingÚresume_writingÚ assertFalseÚhasattr©ÚselfÚfÚp©rúT/opt/bitninja-python-dojo/embedded/lib/python3.9/test/test_asyncio/test_protocols.pyÚtest_base_protocol sz$ProtocolsAbsTests.test_base_protocolcCs~t ¡}t ¡}| | |¡¡| | |¡¡| | |¡¡| | ¡¡| |  ¡¡| |  ¡¡|  t |dƒ¡dSr) rrrÚProtocolrr r Z data_receivedZ eof_receivedr r r rrrrrÚ test_protocolszProtocolsAbsTests.test_protocolcCs€t ¡}t ¡}| | |¡¡| | |¡¡| | d¡¡| | d¡¡| |  ¡¡| |  ¡¡|  t |dƒ¡dS)Nédé–r) rrrZBufferedProtocolrr r Z get_bufferZbuffer_updatedr r r rrrrrÚtest_buffered_protocolsz(ProtocolsAbsTests.test_buffered_protocolcCsft ¡}t ¡}| | |¡¡| | |¡¡| | |¡¡| | ||¡¡|  t |dƒ¡dSr) rrrZDatagramProtocolrr r Zerror_receivedZdatagram_receivedr r)rrZdprrrÚtest_datagram_protocol(sz(ProtocolsAbsTests.test_datagram_protocolcCsvt ¡}t ¡}| | |¡¡| | |¡¡| | d|¡¡| | d|¡¡| |  ¡¡|  t |dƒ¡dS)Nér) rrrZSubprocessProtocolrr r Zpipe_data_receivedZpipe_connection_lostZprocess_exitedr r)rrÚsprrrÚtest_subprocess_protocol1sz*ProtocolsAbsTests.test_subprocess_protocolN)Ú__name__Ú __module__Ú __qualname__rrrrrrrrrrs     r)ZunittestrrZTestCaserrrrrÚs