File: //usr/lib/python3/dist-packages/twisted/web/test/__pycache__/test_stan.cpython-310.pyc
o
�bT � @ sj d Z ddlZddlmZ ddlmZ ddlmZmZm Z m
Z
mZ de
de
defd d
�ZG dd� de�Z
dS )
zW
Tests for L{twisted.web._stan} portion of the L{twisted.web.template}
implementation.
� N)�NoReturn)�TestCase)�CDATA�CharRef�Comment�Flattenable�Tag�a�kw�returnc O s t d�| i |��S )z(
Produce a new tag for testing.
�hello)r )r r
� r
�</usr/lib/python3/dist-packages/twisted/web/test/test_stan.py�proto s r c @ s� e Zd ZdZddd�Zddd�Zddd �Zdd
d�Zddd
�Zddd�Z ddd�Z
ddd�Zddd�Zddd�Z
ddd�Zddd�ZdS )�TagTestsz
Tests for L{Tag}.
r Nc C s* t dd�}| �|jd� | �|ji � dS )z�
Setting an attribute named C{render} will change the C{render} instance
variable instead of adding an attribute.
�
myRenderer��renderN)r �assertEqualr �
attributes��self�tagr
r
r �test_renderAttribute s
zTagTests.test_renderAttributec C sL | � t��
}tdd� W d � n1 sw Y | �|jjd d� dS )z�
Attempting to set an attribute named C{render} to something other than
a string will raise L{TypeError}.
�S r Nr z0Value for "render" attribute must be str, got 83)�assertRaises� TypeErrorr r � exception�args)r �er
r
r �test_renderAttributeNonString&