Current File : //proc/self/root/lib/python3/dist-packages/twisted/web/test/__pycache__/test_tap.cpython-312.pyc |
�
Ϫ�fp/ � �^ � d Z ddlmZ ddlZddlZddlmZ ddlmZ ddl m
Z
mZ ddlm
Z
mZ ddlmZ dd lmZ dd
lmZ ddlmZ ddlmZ dd
lmZ ddlmZ ddlmZmZ ddl m!Z! ddl"m#Z# ddl$m%Z%m&Z& ddl'm(Z(m)Z)m*Z*m+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 e2� Z3 G d� de� Z4 G d� de� Z5y)z
Tests for L{twisted.web.tap}.
� )�annotationsN)�cast)�skipIf)� endpoints�reactor)�IReactorCore�IReactorUNIX)�FilePath)�
requireModule)�
ThreadPool)�
UsageError)�PBServerFactory)�TestCase)�demo)�ResourcePublisher�
UserDirectory)�PythonScript)�Site)�Data�File)�Options�_AddHeadersResource�makePersonalServerFactory�makeService)�DummyRequest)� CGIScript)�WSGIResourcec � � e Zd ZdZdd�Zdd�Z e ej e � d� dd�� Z
dd�Zdd�Zdd�Z
dd �Z e ej e � d� dd
�� Z e ej e � d� dd�� Zdd�Zdd
�Zdd�Zdd�Z e ed� dud� dd�� Z e ed� du d� dd�� Zdd�Zdd�Zdd�Zdd�Zdd�Zy)�ServiceTestszD
Tests for the service creation APIs in L{twisted.web.tap}.
c � � t | j � � }|j � t � }|j d|j
g� |d }||fS )a�
Helper for the I{--path} tests which creates a directory and creates
an L{Options} object which uses that directory as its static
filesystem root.
@return: A two-tuple of a L{FilePath} referring to the directory and
the value associated with the C{'root'} key in the L{Options}
instance after parsing a I{--path} option.
�--path�root)r
�mktemp�makedirsr �parseOptions�path)�selfr&