Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/twisted/web/test/__pycache__/test_vhost.cpython-39.pyc
Ðазад
a k�h1 � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m Z ddlmZ ddl mZ dd lmZ dd lmZmZmZ G dd� de�ZG d d� de�ZG dd� de�ZdS )z! Tests for L{twisted.web.vhost}. � )� gatherResults)�TestCase)� NOT_FOUND)� NoResource)�Site)�Data)�_render)�DummyRequest)�NameVirtualHost�VHostMonsterResource� _HostResourcec @ s e Zd ZdZdd� ZdS )�HostResourceTestsz% Tests for L{_HostResource}. c C s� t dd�}t dd�}t dd�}|�d|� |�d|� t� }t� }t dd�|_|�d|� tddg�}g d �|_t|�|_ d d� |_ d|_|�d|�}| � |t � tddg�}|�d|�}| � |t� d S )z� L{_HostResource.getChild} returns the proper I{Resource} for the vhost embedded in the URL. Verify that returning the proper I{Resource} required changing the I{Host} in the header. s root data� s uri datas test datas tests uris default data� baz.com)s bar� httpr c S s dS )NF� r r r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/twisted/web/test/test_vhost.py�<lambda>- � z1HostResourceTests.test_getChild.<locals>.<lambda>r N)r ZputChildr r �default�addHostr �prepathr �site�isSecure�host�getChild�assertIsInstancer )�selfZbazrootZbazuriZbaztest�hr�root�request�stepr r r � test_getChild s&