Current File : //usr/lib/python3/dist-packages/twisted/web/test/__pycache__/test_flatten.cpython-312.pyc |
�
Ϫ�f�f � � � d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z ddl
mZmZm
Z
mZmZmZmZ ddlmZ ddlmZ dd lmZmZ dd
lmZmZmZmZmZ ddlm Z ddl!m"Z" dd
l#m$Z$ ddl%m&Z& ddl'm(Z(m)Z)m*Z* ddl+m,Z,m-Z-m.Z. ddl/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z; ddl<m=Z= G d� de=e"� Z> G d� de$� Z?d� j� j� ZB G d� de$� ZCy)zf
Tests for the flattening portion of L{twisted.web.template}, implemented in
L{twisted.web._flatten}.
� N)�OrderedDict��dedent)�FunctionType)�Callable�Dict�List�NoReturn�Optional�Tuple�cast)�XML)�implementer)�assert_that�equal_to)�CancelledError�Deferred�
gatherResults�passthru�succeed)�Failure)�XMLAssertionMixin)�SynchronousTestCase)�BUFFER_SIZE)�FlattenerError�UnfilledSlot�UnsupportedType)�IRenderable�IRequest�ITemplateLoader)�CDATA�CharRef�Comment�Element�Flattenable�Tag� TagLoader�flatten�
flattenString�renderer�slot�tags)�FlattenTestCasec �H � e Zd ZdZd$d�Zd$d�Zd$d�Zd$d�Zd$d�Zd e e
gef d
e egef ddfd�Z
d$d�Zd$d
�Zd$d�Zd$d�Zd$d�Zd$d�Zd
e egef ddfd�Zd$d�Zd$d�Zd$d�Zd$d�Zdeee fd�Zd$d�Zd$d�Zd$d�Zd$d�Z d$d�Z!d$d�Z"d$d�Z#d$d�Z$d$d �Z%d$d!�Z&d$d"�Z'd$d#�Z(y)%�SerializationTestsz.
Tests for flattening various things.
�returnNc �x � | j t j t j d� d�� d� y)z:
Test that nested tags flatten correctly.
�42�there)�his'