%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/web/test/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/web/test/__pycache__/test_util.cpython-312.pyc |
� Ϫ�f ; � �` � d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z m Z ddlmZm Z ddlmZ dd lmZ dd lmZ ddlmZmZmZ ddlmZmZ dd lmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$ G d� de � Z% G d� de � Z& G d� de � Z' G d� de � Z( G d� dejR � Z* G d� de � Z+y)z Tests for L{twisted.web.util}. � N)�defer)� networkString)�Failure)�SynchronousTestCase�TestCase)�resource�util)�FlattenerError)�FOUND)�Request)� TagLoader� flattenString�tags)�DummyChannel�DummyRequest) �DeferredResource�FailureElement�ParentRedirect� _FrameElement�_SourceFragmentElement�_SourceLineElement� _StackElement� formatFailure� redirectToc �( � e Zd ZdZd� Zd� Zd� Zd� Zy)�RedirectToTestsz" Tests for L{redirectTo}. c �F � t t � d� }d|_ d}t ||� | j |j t � | j |j j d� |g� | j |j j d� dg� y)z� L{redirectTo} will set the C{Location} and C{Content-Type} headers on its request, and set the response code to C{FOUND}, so the browser will be redirected. T� GETs http://target.example.com/4321s locations content-types text/html; charset=utf-8N) r r �methodr �assertEqual�coder �responseHeaders� getRawHeaders��self�request� targetURLs �</usr/lib/python3/dist-packages/twisted/web/test/test_util.py�test_headersAndCodez#RedirectToTests.test_headersAndCode&