%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/web/test/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/web/test/__pycache__/test_resource.cpython-312.pyc |
� Ϫ�fy) � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m Z mZmZm ZmZmZmZ ddlmZ G d� d e� Z G d � de� Z G d� d e� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Zy)z$ Tests for L{twisted.web.resource}. � )�TestCase)�UnsupportedMethod)�Headers)�IRequest)� FORBIDDEN� NOT_FOUND�Resource�_UnsafeErrorPage�_UnsafeForbiddenResource�_UnsafeNoResource�getChildForRequest)�DummyRequestc �p � e Zd ZdZeZeZeZ dd�Z dd�Zdd�Zdd�Z ded ed ededdf d�Zdd �Zdd�Zdd�Zy)�ErrorPageTestszb Tests for L{_UnafeErrorPage}, L{_UnsafeNoResource}, and L{_UnsafeForbiddenResource}. �returnNc �� � ddl m} | j || j � | j � \ }| j |d t � | j d|d � y)z� The public C{twisted.web.resource.ErrorPage} alias for the corresponding C{_Unsafe} class produces a deprecation warning when imported. r )� ErrorPage�categoryztwisted.web.pages.errorPage�messageN)�twisted.web.resourcer �assertIs� errorPage� flushWarnings�assertEqual�DeprecationWarning�assertIn)�selfr �warnings �@/usr/lib/python3/dist-packages/twisted/web/test/test_resource.py�test_deprecatedErrorPagez'ErrorPageTests.test_deprecatedErrorPage"