K izddlZddlZddlmZddlmZddlmZddlm Z ddl m Z ddl m Z mZmZGdd e Zy) N)HTTP1Connection)HTTPMessageDelegate)IOStream)Event)add_accept_handler) AsyncTestCasebind_unused_portgen_testcBeZdZdZfdZedZedZxZS)HTTP1ConnectionTestNcBt||jyN)supersetUp asyncSetUp)self __class__s g/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/tornado/test/http1connection_test.pyrzHTTP1ConnectionTest.setUps   c#Kt\}}tfd}t||tt j_j j jj jd|fjgjj||jyw)Nct|_jjjj yr)r server_stream addCleanupcloseset)connaddreventrs raccept_callbackz7HTTP1ConnectionTest.asyncSetUp..accept_callbacks0!)$D  OOD..44 5 IIKrz 127.0.0.1) r rrrsocket client_streamrrconnectwaitio_loopremove_handler)rlistenerportrrs` @rrzHTTP1ConnectionTest.asyncSetUps)+$  8_5%fmmo6 **001!!));*=> MM ##H-sC Cc#Kt|jd}|jjd|jj t |gGfddt }|j|j|j|jd|jdjdyw)NTs"HTTP/1.0 200 Not Modified helloc,eZdZfdZfdZfdZy)CHTTP1ConnectionTest.test_http10_no_content_length..Delegatec(|j_yr)code)r start_lineheaderstests rheaders_receivedzTHTTP1ConnectionTest.test_http10_no_content_length..Delegate.headers_received1s&OO rc(j|yr)append)rdatabodys r data_receivedzQHTTP1ConnectionTest.test_http10_no_content_length..Delegate.data_received4s D!rc&jyr)r)rrs rfinishzJHTTP1ConnectionTest.test_http10_no_content_length..Delegate.finish7s  rN)__name__ __module__ __qualname__r0r5r7)r4rr/srDelegater*0s , " rr;rshello) rr!rwriterrr read_responser# assertEqualr,join)rrr;r4rr/s @@@rtest_http10_no_content_lengthz1HTTP1ConnectionTest.test_http10_no_content_length$st1148   !JK   "  *   ,,jjl C( $2sCC) r8r9r:r,rr rrA __classcell__)rs@rr r s5 D 33rr )r typingtornado.http1connectionrtornado.httputilrtornado.iostreamr tornado.locksrtornado.netutilrtornado.testingrr r r rrrKs, 30%.EE13-13r