| Server IP : 139.59.63.204 / Your IP : 216.73.217.62 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ubuntu-s-1vcpu-1gb-blr1-01 6.8.0-110-generic #110-Ubuntu SMP PREEMPT_DYNAMIC Thu Mar 19 15:09:20 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/twisted/web/test/__pycache__/ |
Upload File : |
�
ojLN � � � d Z ddlmZmZ ddlmZ ddlmZmZm Z m
Z
mZ ddlm
Z
ddlmZ ddlmZ G d� d e� Z G d
� d� Z G d� d
e� Z G d� de� Z G d� de� Z G d� d� Z G d� de� Zy)z
Test for L{twisted.web.proxy}.
� )�
MemoryReactor� StringTransportWithDisconnection)�TestCase)�ProxyClient�ProxyClientFactory�ProxyRequest�ReverseProxyRequest�ReverseProxyResource)�Resource)�Site��DummyRequestc �4 � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z y) �ReverseProxyResourceTestsz,
Tests for L{ReverseProxyResource}.
c �R � t � }t � }t ddd|� }|j d|� t |� }t � }|j
d� }|j |� | j |j d� |j d|z dz � |j \ \ } }
}}}
| j | d� | j |
d� | j |t � | j |j |� | j |j d d � y)
z�
Check that a request pointing at C{uri} produce a new proxy connection,
with the path of this request pointing at C{expectedURI}.
� 127.0.0.1�� � /paths indexNs GET s HTTP/1.1
Accept: text/html
� hosts 127.0.0.1:1234)r r r
�putChildr r �
buildProtocol�makeConnection�
addCleanup�connectionLost�dataReceived�
tcpClients�assertEqual�assertIsInstancer �rest�headers)�self�uri�expectedURI�root�reactor�resource�site� transport�channel�host�port�factory�_timeout�
_bind_addrs �=/usr/lib/python3/dist-packages/twisted/web/test/test_proxy.py�_testRenderz%ReverseProxyResourceTests._testRender s � �
�z���/��'��T�8�W�M���
�
�h��)��D�z��4�6� ��$�$�T�*�����y�)�����.�.��5����W�s�]�-V�V�W�8?�8J�8J�5� 4�$��g�x������{�+�����t�$�
���g�'9�:�������{�3��������1�3D�E� c �&