GOOD SHELL MAS BOY
Server: Apache/2.4.52 (Ubuntu)
System: Linux vmi1836763.contaboserver.net 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64
User: www-data (33)
PHP: 8.4.10
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/supervisor/tests/__pycache__/test_http.cpython-310.pyc
o

|��]Jc�@s�ddlZddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ddlm
Z
ddlmZddlm
Z
ddlmZddlmZdd	lmZdd
lmZddlmZddlmZGd
d�d�ZGdd�deej�ZGdd�deej�ZGdd�dej�ZGdd�dej�ZGdd�dej�ZGdd�dej�ZGdd�dej�ZGdd�dej�ZGdd �d ej�Zd!Z Gd"d#�d#ej�Z!Gd$d%�d%ej�Z"Gd&d'�d'ej�Z#Gd(d)�d)ej�Z$Gd*d+�d+�Z%Gd,d-�d-�Z&d.d/�Z'e(d0kr�ej)d/d1�dSdS)2�N)�as_bytes)�	as_string)�sha1)�DummySupervisor)�PopulatedDummySupervisor)�DummyRPCInterfaceFactory)�DummyPConfig)�DummyOptions)�DummyRequest)�DummyLogger)�NOT_DONE_YETc@�eZdZdd�Zdd�ZdS)�HandlerTestscC�|��|�S�N��_getTargetClass)�self�supervisord�r�</usr/lib/python3/dist-packages/supervisor/tests/test_http.py�_makeOne�zHandlerTests._makeOnecCs:Gdd�d�}t�}|�|�}|�|�||j��d�dS)Nc@seZdZdd�ZdS)z,HandlerTests.test_match.<locals>.FakeRequestcS�
||_dSr)�uri)rrrrr�__init__�
z5HandlerTests.test_match.<locals>.FakeRequest.__init__N)�__name__�
__module__�__qualname__rrrrr�FakeRequestsr T)rr�assertEqual�match�path)rr �
supervisor�handlerrrr�
test_matchs
zHandlerTests.test_matchN)rrrrr&rrrrr�rc@�,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�LogtailHandlerTestscC�ddlm}|S)Nr)�logtail_handler)�supervisor.httpr+)rr+rrrr$�z#LogtailHandlerTests._getTargetClasscCsXt�}t|ddddd�}t|d|�}|�|�}tdddd�}|�|�|�|jd�dS)N�process1z
/bin/process1�z/tmp/process1.log)�priority�stdout_logfile�/logtail/process1��r	rrrr
�handle_requestr!�_error�r�options�pconfigrr%�requestrrr�'test_handle_request_stdout_logfile_none(s
�

z;LogtailHandlerTests.test_handle_request_stdout_logfile_nonecCsTt�}t|ddd�}t|d|�}|�|�}tdddd�}|�|�|�|jd�dS)N�fooz
it/is/missing�/logtail/foor3r4r7rrr�*test_handle_request_stdout_logfile_missing2s

z>LogtailHandlerTests.test_handle_request_stdout_logfile_missingc		Cs�t���o}|j}t�}t|dd|d�}t|d|�}|�|�}tdddd�}|�|�|�	|j
d�ddlm}|�	|j
d|�t�|�tj��|�	|j
dd�|�	|j
d	d
�|�	t|j�d�|�	|jd�Wd�dS1svwYdS)
Nr<)r1r=r��	http_date�
Last-Modified�Content-Type�text/plain;charset=utf-8zX-Accel-Buffering�nor/T)�tempfile�NamedTemporaryFile�namer	rrrr
r5r!r6�supervisor.medusar@�headers�build_http_date�os�stat�ST_MTIME�len�	producers�_done)	r�f�tr8r9rr%r:r@rrr�test_handle_request;s$


�"�z'LogtailHandlerTests.test_handle_requestN�rrrrr;r>rSrrrrr)#s

	r)c@r()
�MainLogTailHandlerTestscCr*)Nr)�mainlogtail_handler)r,rV)rrVrrrrNr-z'MainLogTailHandlerTests._getTargetClasscCs:t�}|�|�}tdddd�}|�|�|�|jd�dS)N�/mainlogtailr3)rrr
r5r!r6)rr$r%r:rrrr;Rs


z?MainLogTailHandlerTests.test_handle_request_stdout_logfile_nonecCsBt�}d|j_tdddd�}|�|�}|�|�|�|jd�dS)Nz
/not/thererWr3)rr8�logfiler
rr5r!r6)rr$r:r%rrrr>Ys

zBMainLogTailHandlerTests.test_handle_request_stdout_logfile_missingc	Cs�t�}t���Y}|j}||j_|�|�}tdddd�}|�|�|�	|j
d�ddlm}|�	|j
d|�t�|�tj��|�	|j
dd�|�	t|j�d�|�	|jd�Wd�dS1scwYdS)	NrWrr?rArBrCr/T)rrErFrGr8rXrr
r5r!r6rHr@rIrJrKrLrMrNrOrP)rr$rQrRr%r:r@rrrrSas 


�"�z+MainLogTailHandlerTests.test_handle_requestNrTrrrrrUMs
rUc@�<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�TailFProducerTestscCr*)Nr)�tail_f_producer)r,r[)rr[rrrrsr-z"TailFProducerTests._getTargetClasscCs|��|||�Srr)rr:�filename�headrrrrw�zTailFProducerTests._makeOnecCs�tdddd�}ddlm}t��}|�d�|��|�||jd�}|�	�}|�
|d�|�td��|��|�	�}|�
|d�|�	�}|�
||j�|�
d�|��|�	�}|�
|d�dS)Nr=r)�http�Paaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�Psdwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwz==> File truncated <==
)r
r$r_rErF�write�flushrrG�morer!rr�truncate)rr:r_rQ�producer�resultrrr�test_handle_morezs$

z#TailFProducerTests.test_handle_morecCs�tdddd�}t���$}|�td��|��|�||jd�}|j�	�|�
�}Wd�n1s2wY|�||�
��dS)Nr=�Paaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaara)r
rErFrbrrcrrG�file�closerdr!)rr:rQrfrgrrr�test_handle_more_fd_closed�s


�z-TailFProducerTests.test_handle_more_fd_closedc	Cs�tdddd�}t��}|�td��|��|�||jd�}|��}|�	|d�|�
�t|jd�}z|�td��|�
�|��}Wt�
|j�nt�
|j�w|�	|d�dS)Nr=rirar`�wb�Pbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)r
rErFrbrrcrrGrdr!rk�openrK�unlink)rr:rQrfrg�f2rrr�&test_handle_more_follow_file_recreated�s
z9TailFProducerTests.test_handle_more_follow_file_recreatedc	Cs�tdddd�}t��}t|d��
}|�d�Wd�n1s wYz|�||jd�}Wt�|j�nt�|j�w|�	�}|�
|d�t|d��}|�td��Wd�n1s^wYz|�	�}|�
|d�Wt�|j�dSt�|j�w)Nr=rmr`rarn)r
rE�mktemprorbrrGrKrprdr!r)rr:r\rQrfrgrrr�!test_handle_more_follow_file_gone�s"��z4TailFProducerTests.test_handle_more_follow_file_goneN)	rrrrrrhrlrrrtrrrrrZrs
rZc@sNeZdZdd�Zddd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dS)�DeferringChunkedProducerTestscCr*)Nr)�deferring_chunked_producer)r,rv)rrvrrrr�r-z-DeferringChunkedProducerTests._getTargetClassNcC�|��||�Srr)rrf�footersrrrr��z&DeferringChunkedProducerTests._makeOnecC�&tt�}|�|�}|�|��t�dSr��
DummyProducerrrr!rd�r�wrappedrfrrr�test_more_not_done_yet��
z4DeferringChunkedProducerTests.test_more_not_done_yetcC�&td�}|�|�}|�|��d�dS)N�hellos
5
hello
�r|rr!rdr}rrr�test_more_string�r�z.DeferringChunkedProducerTests.test_more_stringcCs,t�}|j|ddgd�}|�|��d�dS)N�a�b�rx�0
a
b

r�r}rrr�test_more_nodata�sz.DeferringChunkedProducerTests.test_more_nodatacCs.td�}|j|ddgd�}|�|��d�dS)N�r�r�r�r�r�r}rrr�test_more_nodata_footers�sz6DeferringChunkedProducerTests.test_more_nodata_footerscCr�)Nr�s0

r�r}rrr�test_more_nodata_nofooters�r�z8DeferringChunkedProducerTests.test_more_nodata_nofooterscCs|�d�}|�|��d�dS�Nr��rr!rd�rrfrrr�test_more_noproducer��
z2DeferringChunkedProducerTests.test_more_noproducerr)rrrrrrr�r�r�r�r�rrrrru�s
ruc@�4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�DeferringCompositeProducerTestscCr*)Nr)�deferring_composite_producer)r,r�)rr�rrrr�r-z/DeferringCompositeProducerTests._getTargetClasscCrrr)rrOrrrr�rz(DeferringCompositeProducerTests._makeOnecCs(tt�}|�|g�}|�|��t�dSrr{r}rrrr��z6DeferringCompositeProducerTests.test_more_not_done_yetcCsRtd�}td�}|�||g�}|�|��d�|�|��d�|�|��d�dS)N�hello�goodbyer�r�)r�wrapped1�wrapped2rfrrrr��sz0DeferringCompositeProducerTests.test_more_stringcCs&t�}|�|g�}|�|��d�dSr�r�r}rrrr��sz0DeferringCompositeProducerTests.test_more_nodataN�rrrrrrr�r�rrrrr��sr�c@s6eZdZdd�Zd
dd�Zdd�Zdd	�Zd
d�ZdS)�DeferringGlobbingProducerTestscCr*)Nr)�deferring_globbing_producer)r,r�)rr�rrrr�r-z.DeferringGlobbingProducerTests._getTargetClass�cCrwrr)rrf�buffer_sizerrrrryz'DeferringGlobbingProducerTests._makeOnecCrzrr{r}rrrrr�z5DeferringGlobbingProducerTests.test_more_not_done_yetcCsXtddd�}|j|dd�}|�|��d�tddd�}|j|dd�}|�|��d�dS)	Nr��there�guyr/)r�r��2s
hellothereguyr�r}rrrr�	sz/DeferringGlobbingProducerTests.test_more_stringcCs$t�}|�|�}|�|��d�dSr�r�r}rrrr�s
z/DeferringGlobbingProducerTests.test_more_nodataN)r�r�rrrrr��s
	r�c@rY)�DeferringHookedProducerTestscCr*)Nr)�deferring_hooked_producer)r,r�)rr�rrrrr-z,DeferringHookedProducerTests._getTargetClasscCrwrr)rrf�functionrrrrryz%DeferringHookedProducerTests._makeOnecCs(tt�}|�|d�}|�|��t�dSrr{r}rrrrr�z3DeferringHookedProducerTests.test_more_not_done_yetcsZtd�}g��fdd�}|�||�}|�|��d�|��g�|��|��dg�dS)Nr�c���|�dSr��append��bytes��Lrr�callback'ryz?DeferringHookedProducerTests.test_more_string.<locals>.callback�r��rr~r�rfrr�rr�$sz-DeferringHookedProducerTests.test_more_stringcsDt�}g��fdd�}|�||�}|�|��d�|��dg�dS)Ncr�rr�r�r�rrr�2ryz?DeferringHookedProducerTests.test_more_nodata.<locals>.callbackr�rr�r�rr�rr�/sz-DeferringHookedProducerTests.test_more_nodatacCs |�dd�}|�|��d�dSr�r�r�rrrr�8sz1DeferringHookedProducerTests.test_more_noproducerN)	rrrrrrr�r�r�rrrrr�s	r�c@szeZdZdd�Z						dd	d
�Zdd�Zd
d�Zdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS) �DeferringHttpRequestTestscCr*)Nr)�deferring_http_request)r,r�)rr�rrrr=r-z)DeferringHttpRequestTests._getTargetClassN�GET / HTTP/1.0�GET�/�1.0rcCs|��||||||�Srr)r�channel�req�commandr�version�headerrrrrAs	�z"DeferringHttpRequestTests._makeOnecCsGdd�d�}|�S)Nc@s eZdZdZdd�Zdd�ZdS)z7DeferringHttpRequestTests._makeChannel.<locals>.ChannelFcS�
d|_dS�NT)�closed�rrrr�close_when_doneQrzGDeferringHttpRequestTests._makeChannel.<locals>.Channel.close_when_donecSrr)rfr�rrr�push_with_producerSrzJDeferringHttpRequestTests._makeChannel.<locals>.Channel.push_with_producerN)rrrr�r�r�rrrr�ChannelOsr�r)rr�rrr�_makeChannelNsz&DeferringHttpRequestTests._makeChannelcCs.|��}|j|dd�}|��|�|j�dS)Nr��r�r��r�r�done�
assertTruer��rr��instrrr�test_done_http_10_nokeepaliveWsz7DeferringHttpRequestTests.test_done_http_10_nokeepalivecC�2|��}|j|ddgd�}|��|�|j�dS)Nr��Connection: Keep-Alive�r�r�r�r�r�rrr�-test_done_http_10_keepalive_no_content_length]s�zGDeferringHttpRequestTests.test_done_http_10_keepalive_no_content_lengthcCsL|��}|j|ddgd�}d|jd<|��|�|dd�|�|j�dS)Nr�r�r�r/zContent-Length�
Connectionz
Keep-Alive)r�r�
reply_headersr�r!�assertFalser�r�rrr�.test_done_http_10_keepalive_and_content_lengthhs�
zHDeferringHttpRequestTests.test_done_http_10_keepalive_and_content_lengthcCr�)N�1.1zConnection: closer�r�r�rrr�"test_done_http_11_connection_closets�z<DeferringHttpRequestTests.test_done_http_11_connection_closecC�8|��}|j|dd�}d|jd<|��|�|j�dS)Nr�r��
notchunked�Transfer-Encoding)r�rr�r�r�r�r�rrr�+test_done_http_11_unknown_transfer_encoding~��
zEDeferringHttpRequestTests.test_done_http_11_unknown_transfer_encodingcCr�)Nr�r��chunkedr�)r�rr�r�r�r�r�rrr�+test_done_http_11_chunked_transfer_encoding�r�zEDeferringHttpRequestTests.test_done_http_11_chunked_transfer_encodingcCsB|��}|j|dd�}d|_|��|�d|v�|�|j�dS)Nr�r�Tr�)r�r�use_chunkedr�r�r�r�r�rrr�test_done_http_11_use_chunked�s�z7DeferringHttpRequestTests.test_done_http_11_use_chunkedcCs4|��}|j|dd�}d|_|��|�|j�dS)Nr�r�F)r�rr�r�r�r�r�rrr�>test_done_http_11_wo_content_length_no_te_no_use_chunked_close�s�zXDeferringHttpRequestTests.test_done_http_11_wo_content_length_no_te_no_use_chunked_closecCs.|��}|j|dd�}|��|�|j�dS)Nr�r�r�rrr�test_done_http_09�s�z+DeferringHttpRequestTests.test_done_http_09)Nr�r�r�r�r)rrrrrr�r�r�r�r�r�r�r�r�r�rrrrr�<s&
�
	



r�c@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�DeferringHttpChannelTestscCr*)Nr)�deferring_http_channel)r,r�)rr�rrrr�r-z)DeferringHttpChannelTests._getTargetClasscCs|��dddd�S)N)�server�conn�addrrr�rrrr�s
�z"DeferringHttpChannelTests._makeOnecCs(|��}|�|jd�|�|jd�dS)Nr)rr!�delay�last_writable_check)rr�rrr�0test_defaults_delay_and_last_writable_check_time�szJDeferringHttpChannelTests.test_defaults_delay_and_last_writable_check_timecCs@|��}d|_t|_td}|�|j|d��|�|jt�dS)N�r/��now�rr��_NOWr�r��writabler!�rr��laterrrr�5test_writable_with_delay_is_False_if_elapsed_lt_delay��zODeferringHttpChannelTests.test_writable_with_delay_is_False_if_elapsed_lt_delaycCsB|��}d|_t|_t|j}|�|j|d��|�|jt�dS)Nr�r�r�r�rrr�5test_writable_with_delay_is_False_if_elapsed_eq_delay�s
zODeferringHttpChannelTests.test_writable_with_delay_is_False_if_elapsed_eq_delaycCsF|��}d|_t|_t|jd}|�|j|d��|�|j|�dS)Nr�g�������?r��rr�r�r�r�r�r!r�rrr�4test_writable_with_delay_is_True_if_elapsed_gt_delay�szNDeferringHttpChannelTests.test_writable_with_delay_is_True_if_elapsed_gt_delaycCs@|��}d|_t|_td}|�|j|d��|�|j|�dS)Nr�ir�r�r�rrr�>test_writable_with_delay_is_True_if_system_time_goes_backwards�r�zXDeferringHttpChannelTests.test_writable_with_delay_is_True_if_system_time_goes_backwardsN)
rrrrrr�r�r�r�r�rrrrr��sr�if��Wc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�"EncryptedDictionaryAuthorizedTestscCr*)Nr��encrypted_dictionary_authorizer)r,r�)rr�rrrr�r-z2EncryptedDictionaryAuthorizedTests._getTargetClasscCrrr)r�dictrrrr�rz+EncryptedDictionaryAuthorizedTests._makeOnecCs|�i�}|�|�d��dS)N�r<�bar�rr��	authorize�r�
authorizerrrr�test_authorize_baduser�r�z9EncryptedDictionaryAuthorizedTests.test_authorize_badusercC�"|�ddi�}|�|�d��dS)Nr<�passwordr�r�r�rrr�#test_authorize_gooduser_badpassword��zFEncryptedDictionaryAuthorizedTests.test_authorize_gooduser_badpasswordcCr�)Nr<r�r<r�rr�r�r�rrr�$test_authorize_gooduser_goodpassword�rzGEncryptedDictionaryAuthorizedTests.test_authorize_gooduser_goodpasswordcCr�)Nr<�	pass:word)r<rrr�rrr�/test_authorize_gooduser_goodpassword_with_colon�rzREncryptedDictionaryAuthorizedTests.test_authorize_gooduser_goodpassword_with_coloncC�6dttd����}|�d|i�}|�|�d��dS)N�{SHA}rr<r�)rr�	hexdigestrr�r��rrr�rrr�'test_authorize_gooduser_badpassword_sha��zJEncryptedDictionaryAuthorizedTests.test_authorize_gooduser_badpassword_shacCr)Nr	rr<r)rrr
rr�r�rrrr�(test_authorize_gooduser_goodpassword_shar
zKEncryptedDictionaryAuthorizedTests.test_authorize_gooduser_goodpassword_shaN)rrrrrr�rrrrrrrrrr��sr�c@rY)�SupervisorAuthHandlerTestscCr*)Nr��supervisor_auth_handler)r,r)rrrrrrr-z*SupervisorAuthHandlerTests._getTargetClasscCrwrr)rr�r%rrrr
ryz#SupervisorAuthHandlerTests._makeOnecCs0|�ddid�}ddlm}|�|jj|�dS)N�ar/rr�)rr,r�r!r��	__class__)rr%r�rrr�	test_ctor
s

�z$SupervisorAuthHandlerTests.test_ctorcC�\tdddd�}t�td��}dt|�g|_t�}|�ddi|�}|�|�|�	|j
�dS)Nr2z
user:password�Authorization: Basic %s�userr�r
�base64�	b64encoderrr��DummyHandlerrr5r��handled_request�rr:�encodedr%�auth_handlerrrr�/test_handle_request_authorizes_good_credentials�
zJSupervisorAuthHandlerTests.test_handle_request_authorizes_good_credentialscCr)Nr2zuser:pass:wordrrrrrrrr�7test_handle_request_authorizes_good_password_with_colons
zRSupervisorAuthHandlerTests.test_handle_request_authorizes_good_password_with_coloncCr)Nr2zwrong:wrongrrr)r
rrrrr�rrr5r�rrrrr�6test_handle_request_does_not_authorize_bad_credentials&r!zQSupervisorAuthHandlerTests.test_handle_request_does_not_authorize_bad_credentialsN)	rrrrrrr r"r#rrrrrs	
rc@r�)�LogWrapperTestscCr*)Nr)�
LogWrapper)r,r%)rr%rrrr0r-zLogWrapperTests._getTargetClasscCrrr)r�loggerrrrr4rzLogWrapperTests._makeOnecCsDt�}|�|�}|�d�|j}|�t|�d�|�|dd�dS)Nzfoo
r/rr<)rr�log�datar!rN)rr&�log_wrapper�logdatarrr�'test_strips_trailing_newlines_from_msgs7s

z7LogWrapperTests.test_strips_trailing_newlines_from_msgscC�Jt�}|�|�}g}|j|_|�d�|�t|�d�|�|dd�dS)NzServer Errorr/r)rrr��errorr'r!rN)rr&r)�errorsrrr�(test_logs_msgs_with_error_at_error_level?�

z8LogWrapperTests.test_logs_msgs_with_error_at_error_levelcCr,)NzGET /r/r)rrr��tracer'r!rN)rr&r)�tracesrrr�'test_logs_other_messages_at_trace_levelHr0z7LogWrapperTests.test_logs_other_messages_at_trace_levelN)rrrrrr+r/r3rrrrr$/s	r$c@r()
�TopLevelFunctionTestsc
Cs�t�}||_dtifg|_t�}ddlm}|||�}z&|D]\}}|��|�d�}|dur4t	�
|�qWddlm}	|	�
�|Sddlm}	|	�
�w)N�dummyr)�make_http_serversrj)�
socket_map)r	�server_configsr�rpcinterface_factoriesrr,r6rk�getrKrp�asyncorer7�clear)
r�sconfigsr8rr6�servers�config�s�
socketfiler7rrr�_make_http_serversRs&


���
z(TopLevelFunctionTests._make_http_serversc
Cshddddddd�}z|�|g�|�d�WdSty3}z|�|jdd�WYd}~dSd}~ww)	Ni��	localhost�GE�inet_http_server��family�host�port�usernamer�sectionznothing raisedrz Cannot determine socket type 999)rB�fail�
ValueErrorr!�args)rr?�excrrr�(test_make_http_servers_socket_type_errords� ��z>TopLevelFunctionTests.test_make_http_servers_socket_type_errorc	Cs�t��}tjdddddd�}tj|dddddd�}|�||g�}|�t|�d	�|d
}|�|d
|�|d}gd�}|�d
d�|jD�|�|d}|�|d
|�|d}|�dd�|jD�|�dS)NrCrDrErF�����rS�unix_http_server�rGrj�chmod�chownrJrrKr�rr/)zSupervisor XML-RPC HandlerzLogtail HTTP Request Handlerz!Main Logtail HTTP Request Handlerz&Supervisor Web UI HTTP Request HandlerzDefault HTTP Request HandlercS�g|]}|j�qSr��IDENT��.0�xrrr�
<listcomp>��zGTopLevelFunctionTests.test_make_http_servers_noauth.<locals>.<listcomp>cSrXrrYr[rrrr^�r_)	rErs�socket�AF_INET�AF_UNIXrBr!rN�handlers)	rrA�inet�unixr>�inetdatar��idents�unixdatarrr�test_make_http_servers_noauthns&��z3TopLevelFunctionTests.test_make_http_servers_noauthc	Cs�t��}tjdddddd�}tj|ddddd	d
�}|�||g�}|�t|�d�dd
lm	}|D]\}}|j
D]}|�t||�|�q7q0dS)NrCiHErJrrErFrQrRrTrUr�rr)
rErsr`rarbrBr!rNr,rrcr��
isinstance)	rrArdrer>rr?r�r%rrr�test_make_http_servers_withauth�s&��
���z5TopLevelFunctionTests.test_make_http_servers_withauthN)rrrrBrPrirkrrrrr4Qs

r4c@r
)rcCr�)NF�rr�rrrr�rzDummyHandler.__init__cCr�r�rl)rr:rrrr5�rzDummyHandler.handle_requestN)rrrrr5rrrrr�r'rc@r
)r|cGst|�|_dSr)�listr()rr(rrrr�ryzDummyProducer.__init__cCs|jr	|j�d�SdS)Nrr�)r(�popr�rrrrd�szDummyProducer.moreN)rrrrrdrrrrr|�r'r|cCst�tjt�Sr)�unittest�
findTestCases�sys�modulesrrrrr�
test_suite�r^rs�__main__)�defaultTest)*rrKrLrqr`rEro�supervisor.compatrrr�supervisor.tests.baserrrrr	r
rr,rr�TestCaser)rUrZrur�r�r�r�r�r�r�rr$r4rr|rsr�mainrrrr�<module>sN*%K%%t1"*"H
�