Ë
    oj†q  ã                   óª  — d Z ddlZddlmZ ddlmZmZ ddlmZ ddl	m
Z
 ddlmZmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZmZm Z  ddl!m"Z"m#Z# ddl$m%Z% ddl&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/ ddl0m1Z1 ddl2m3Z3  ee4d¬«      Z5 G d„ de«      Z6 G d„ de«      Z7 G d„ de«      Z8 G d„ d«      Z9 G d„ d ee9«      Z: G d!„ d"ee9«      Z; G d#„ d$ee9«      Z< G d%„ d&ee9«      Z= G d'„ d(e1«      Z> G d)„ d*e1«      Z? G d+„ d,e'«      Z@ G d-„ d.e'«      ZA G d/„ d0e'«      ZB G d1„ d2«      ZC ee"«       G d3„ d4e3«      «       ZD G d5„ d6e«      ZEy)7z#
Tests for L{twisted.web.template}
é    N)ÚStringIO)ÚListÚOptional)Úimplementer)ÚverifyObject)ÚDeferredÚsucceed)ÚEventLoggingObserver)ÚglobalLogPublisher)ÚFailure)ÚFilePath)ÚTestCase)Úsuppress)ÚUnexposedMethodError)ÚFlattenerErrorÚMissingRenderMethodÚMissingTemplateLoader)ÚIRequestÚITemplateLoader)ÚNOT_DONE_YET)	ÚElementÚFlattenableÚTagÚ	TagLoaderÚXMLFileÚ	XMLStringÚrenderElementÚrendererÚtags)ÚFlattenTestCase)ÚDummyRequestúhPassing filenames or file objects to XMLFile is deprecated since Twisted 12.1.  Pass a FilePath instead.)ÚcategoryÚmessagec                   ó8   — e Zd ZdZdd„Zdd„Zdd„Zdd„Zdd„Zy)	ÚTagFactoryTestszO
    Tests for L{_TagFactory} through the publicly-exposed L{tags} object.
    Nc                 ó\   — t         j                  }| j                  |j                  d«       y)z=
        HTML tags can be retrieved through C{tags}.
        ÚaN)r   r(   ÚassertEqualÚtagName©ÚselfÚtags     ú@/usr/lib/python3/dist-packages/twisted/web/test/test_template.pyÚtest_lookupTagzTagFactoryTests.test_lookupTag4   s!   € ô �f‰fˆØ×Ñ˜Ÿ™ cÕ*ó    c                 ó\   — t         j                  }| j                  |j                  d«       y)zj
        Twisted supports the latest and greatest HTML tags from the HTML5
        specification.
        ÚvideoN)r   r2   r)   r*   r+   s     r.   Útest_lookupHTML5Tagz#TagFactoryTests.test_lookupHTML5Tag;   s!   € ô
 �j‰jˆØ×Ñ˜Ÿ™ gÕ.r0   c                 ó\   — t         j                  }| j                  |j                  d«       y)zÏ
        To support transparent inclusion in templates, there is a special tag,
        the transparent tag, which has no name of its own but is accessed
        through the "transparent" attribute.
        Ú N)r   Útransparentr)   r*   r+   s     r.   Útest_lookupTransparentTagz)TagFactoryTests.test_lookupTransparentTagC   s#   € ô ×ÑˆØ×Ñ˜Ÿ™ bÕ)r0   c                 óD   — | j                  t        t        t        d«       y)zv
        Invalid tags which are not part of HTML cause AttributeErrors when
        accessed through C{tags}.
        ÚinvalidN©ÚassertRaisesÚAttributeErrorÚgetattrr   ©r,   s    r.   Útest_lookupInvalidTagz%TagFactoryTests.test_lookupInvalidTagL   s   € ð
 	×Ñœ.¬'´4¸ÕCr0   c                 óD   — | j                  t        t        t        d«       y)z‘
        As a special case, the <xmp> tag is simply not available through
        C{tags} or any other part of the templating machinery.
        ÚxmpNr:   r>   s    r.   Útest_lookupXMPzTagFactoryTests.test_lookupXMPS   s   € ð
 	×Ñœ.¬'´4¸Õ?r0   ©ÚreturnN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r/   r3   r7   r?   rB   © r0   r.   r&   r&   /   s"   „ ñó+ó/ó*óDô@r0   r&   c                   óP   — e Zd Z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)ÚElementTestsz5
    Tests for the awesome new L{Element} class.
    Nc                 ó’   — t        «       }| j                  t        |j                  d«      }| j	                  |j
                  |«       y)zr
        L{Element.render} raises L{MissingTemplateLoader} if the C{loader}
        attribute is L{None}.
        N)r   r;   r   ÚrenderÚassertIdenticalÚelement©r,   rO   Úerrs      r.   Útest_missingTemplateLoaderz'ElementTests.test_missingTemplateLoader`   s8   € ô
 “)ˆØ×ÑÔ 5°w·~±~ÀtÓLˆØ×Ñ˜SŸ[™[¨'Õ2r0   c           	      ót   —  G d„ dt         «      }| j                  dt        t         |«       «      «      «       y)zT
        A L{MissingTemplateLoader} instance can be repr()'d without error.
        c                   ó   — e Zd Zdefd„Zy)úFElementTests.test_missingTemplateLoaderRepr.<locals>.PrettyReprElementrD   c                  ó   — y©NúPretty Repr ElementrI   r>   s    r.   Ú__repr__zOElementTests.test_missingTemplateLoaderRepr.<locals>.PrettyReprElement.__repr__o   ó   € Ø,r0   N©rE   rF   rG   ÚstrrY   rI   r0   r.   ÚPrettyReprElementrU   n   ó   „ ð- #ô -r0   r]   rX   N)r   ÚassertInÚreprr   )r,   r]   s     r.   Útest_missingTemplateLoaderReprz+ElementTests.test_missingTemplateLoaderRepri   s0   € ô
	-¤ô 	-ð 	�‰Ø!¤4Ô(=Ñ>OÓ>QÓ(RÓ#Sõ	
r0   c                 óÊ   — t        «       }| j                  t        |j                  d«      }| j	                  |j
                  |«       | j                  |j                  d«       y)zž
        When called with the name which is not associated with a render method,
        L{Element.lookupRenderMethod} raises L{MissingRenderMethod}.
        ÚfooN)r   r;   r   ÚlookupRenderMethodrN   rO   r)   Ú
renderNamerP   s      r.   Útest_missingRendererMethodz'ElementTests.test_missingRendererMethodv   sO   € ô
 “)ˆØ×ÑÔ 3°W×5OÑ5OÐQVÓWˆØ×Ñ˜SŸ[™[¨'Ô2Ø×Ñ˜Ÿ™¨Õ/r0   c                 óž   —  G d„ dt         «      }t        t         |«       d«      «      }| j                  d|«       | j                  d|«       y)zR
        A L{MissingRenderMethod} instance can be repr()'d without error.
        c                   ó   — e Zd Zdefd„Zy)úDElementTests.test_missingRenderMethodRepr.<locals>.PrettyReprElementrD   c                  ó   — yrW   rI   r>   s    r.   rY   zMElementTests.test_missingRenderMethodRepr.<locals>.PrettyReprElement.__repr__†   rZ   r0   Nr[   rI   r0   r.   r]   ri   …   r^   r0   r]   ÚexpectedMethodrX   N)r   r`   r   r_   )r,   r]   Úss      r.   Útest_missingRenderMethodReprz)ElementTests.test_missingRenderMethodRepr€   sE   € ô
	-¤ô 	-ô Ô$Ñ%6Ó%8Ð:JÓKÓLˆØ�‰Ð+¨QÔ/Ø�‰Ð&¨Õ*r0   c                 óœ   —  G d„ dt         «      } |«       j                  d«      }| j                   |dt        j                  «      d«       y)z‰
        When called with the name of a defined render method,
        L{Element.lookupRenderMethod} returns that render method.
        c                   ó0   — e Zd Zedee   dedefd„«       Zy)úBElementTests.test_definedRenderer.<locals>.ElementWithRenderMethodÚrequestr-   rD   c                  ó   — y)NÚbarrI   ©r,   rq   r-   s      r.   rc   zFElementTests.test_definedRenderer.<locals>.ElementWithRenderMethod.foo”   s   € àr0   N)	rE   rF   rG   r   r   r   r   r   rc   rI   r0   r.   ÚElementWithRenderMethodrp   “   s.   „ Øð 8¨HÑ#5ð ¸Cð ÀKò ó ñr0   ru   rc   Nrs   )r   rd   r)   r   Úbr)r,   ru   rc   s      r.   Útest_definedRendererz!ElementTests.test_definedRenderer�   s>   € ô	¤gô 	ñ
 &Ó'×:Ñ:¸5ÓAˆØ×Ñ™˜T¤4§7¡7Ó+¨UÕ3r0   c                 ó²   ‡— t        t        «       G d„ d«      «       Š G ˆfd„dt        «      } |«       }| j                  |j	                  d«      dg«       y)zi
        L{Element.render} loads a document from the C{loader} attribute and
        returns it.
        c                   ó   — e Zd Zdee   fd„Zy)ú0ElementTests.test_render.<locals>.TemplateLoaderrD   c                 ó   — dgS )NÚresultrI   r>   s    r.   Úloadz5ElementTests.test_render.<locals>.TemplateLoader.load£   s
   € Ø �zÐ!r0   N)rE   rF   rG   r   r   r}   rI   r0   r.   ÚTemplateLoaderrz   ¡   s   „ ð"˜d ;Ñ/ô "r0   r~   c                   ó   •— e Zd Z W ° «       Zy)ú-ElementTests.test_render.<locals>.StubElementN)rE   rF   rG   Úloader)r~   s   €r.   ÚStubElementr€   ¦   s   ø„ Ú#Ó%‰Fr0   r‚   Nr|   )r   r   r   r)   rM   )r,   r‚   rO   r~   s      @r.   Útest_renderzElementTests.test_render›   sQ   ø€ ô 
”_Ó	%÷	"ð 	"ó 
&ð	"ö	&œ'ô 	&ñ “-ˆØ×Ñ˜Ÿ™¨Ó-°¨zÕ:r0   c                 óÌ   — | j                  t        t        «      }t        j                  dk\  r| j                  t        |«      d«       y| j                  t        |«      d«       y)z‚
        If the L{renderer} decorator  is called without any arguments, it will
        raise a comprehensible exception.
        )é   é
   z=Expose.__call__() missing 1 required positional argument: 'f'z6__call__() missing 1 required positional argument: 'f'N)r;   Ú	TypeErrorr   ÚsysÚversion_infor)   r\   )r,   Útes     r.   Útest_misuseRendererz ElementTests.test_misuseRenderer¬   sV   € ð
 ×Ñœy¬(Ó3ˆÜ×Ñ˜wÒ&Ø×ÑÜ�B“ÐXõð ×ÑÜ�B“ÐQõr0   c                 óP   — | j                  t        t        j                  dd«       y)zŒ
        Called directly, without a default, L{renderer.get} raises
        L{UnexposedMethodError} when it cannot find a renderer.
        NÚnotARenderer)r;   r   r   Úgetr>   s    r.   Útest_renderGetDirectlyErrorz(ElementTests.test_renderGetDirectlyError»   s   € ð
 	×ÑÔ.´·±¸dÀNÕSr0   rC   )rE   rF   rG   rH   rR   ra   rf   rm   rw   rƒ   r‹   r�   rI   r0   r.   rK   rK   [   s0   „ ñó3ó
ó0ó+ó4ó;ó"ôTr0   rK   c                   óH   — e Zd ZdZdd„Zdd„Zege_        dd„Zege_        y)ÚXMLFileReprTestszB
    Tests for L{twisted.web.template.XMLFile}'s C{__repr__}.
    Nc                 ój   — t        d«      }| j                  d|›d�t        t        |«      «      «       y)zK
        An L{XMLFile} with a L{FilePath} returns a useful repr().
        ú/tmp/fake.xmlú<XMLFile of ú>N)r   r)   r`   r   )r,   Úpaths     r.   Útest_filePathzXMLFileReprTests.test_filePathÈ   s0   € ô ˜Ó(ˆØ×Ñ˜<¨ x¨qÐ1´4¼À»Ó3FÕGr0   c                 óX   — d}| j                  d|›d�t        t        |«      «      «       y)zH
        An L{XMLFile} with a filename returns a useful repr().
        r“   r”   r•   N)r)   r`   r   )r,   Úfnames     r.   Útest_filenamezXMLFileReprTests.test_filenameÏ   s+   € ð  ˆØ×Ñ˜<¨ y°Ð2´D¼À»Ó4HÕIr0   c                 ój   — t        d«      }| j                  d|›d�t        t        |«      «      «       y)zK
        An L{XMLFile} with a file object returns a useful repr().
        znot xmlr”   r•   N)r   r)   r`   r   )r,   Úfobjs     r.   Ú	test_filezXMLFileReprTests.test_fileØ   s0   € ô ˜	Ó"ˆØ×Ñ˜<¨ x¨qÐ1´4¼À»Ó3FÕGr0   rC   )	rE   rF   rG   rH   r—   rš   Ú_xmlFileSuppressr   r�   rI   r0   r.   r‘   r‘   Ã   s3   „ ñóHóJð /Ð/€MÔóHð +Ð+€IÕr0   r‘   c                   óL   — e Zd ZU eed<   	 dZ	 defd„Zdd„Zdd„Z	e
ge	_        y)	ÚXMLLoaderTestsMixinÚdeprecatedUseú<p>Hello, world.</p>rD   c                 ó   — t         ‚©N)ÚNotImplementedErrorr>   s    r.   ÚloaderFactoryz!XMLLoaderTestsMixin.loaderFactoryî   s   € Ü!Ð!r0   Nc                 ó*  — t        | t        «      sJ ‚| j                  «       }|j                  «       \  }t        |t        «      sJ ‚| j                  | j                  g¬«      }| j                  rP| j                  t        |«      d«       | j                  |d   d   t        «       | j                  |d   d   d«       n| j                  t        |«      d«       | j                  |j                  d«       | j                  |j                  dg«       y	)
zQ
        Verify that the loader returns a tag with the correct children.
        )ÚoffendingFunctionsé   r   r#   r$   r"   ÚpúHello, world.N)Ú
isinstancer   r¦   r}   r   ÚflushWarningsr¡   r)   ÚlenÚDeprecationWarningr*   Úchildren)r,   r�   r-   Úwarningss       r.   Ú	test_loadzXMLLoaderTestsMixin.test_loadñ   só   € ô ˜$¤Ô)Ð)Ð)Ø×#Ñ#Ó%ˆØ—‘“‰ˆÜ˜#œsÔ#Ð#Ð#à×%Ñ%¸$×:LÑ:LÐ9MÐ%ÓNˆØ×ÒØ×ÑœS ›]¨AÔ.Ø×Ñ˜X a™[¨Ñ4Ô6HÔIØ×ÑØ˜‘˜IÑ&ðKõð ×ÑœS ›]¨AÔ.à×Ñ˜Ÿ™ cÔ*Ø×Ñ˜Ÿ™¨Ð'8Õ9r0   c                 ó¬   — t        | t        «      sJ ‚| j                  «       }|j                  «       }|j                  «       }| j	                  ||«       y)zd
        If {load()} can be called on a loader twice the result should be the
        same.
        N)r¬   r   r¦   r}   r)   )r,   r�   Útags1Útags2s       r.   Útest_loadTwicez"XMLLoaderTestsMixin.test_loadTwice	  sH   € ô
 ˜$¤Ô)Ð)Ð)Ø×#Ñ#Ó%ˆØ—‘“ˆØ—‘“ˆØ×Ñ˜ Õ&r0   rC   )rE   rF   rG   ÚboolÚ__annotations__ÚtemplateStringr   r¦   r²   r¶   rž   r   rI   r0   r.   r    r    â   s<   … ØÓðð
 ,€Nðð"˜ó "ó:ó0	'ð  0Ð0€NÕr0   r    c                   ó    — e Zd ZdZdZdefd„Zy)ÚXMLStringLoaderTestsz5
    Tests for L{twisted.web.template.XMLString}
    FrD   c                 ó,   — t        | j                  «      S )zS
        @return: an L{XMLString} constructed with C{self.templateString}.
        )r   r¹   r>   s    r.   r¦   z"XMLStringLoaderTests.loaderFactory  s   € ô ˜×,Ñ,Ó-Ð-r0   N©rE   rF   rG   rH   r¡   r   r¦   rI   r0   r.   r»   r»     s   „ ñð €Mð.˜ô .r0   r»   c                   ó    — e Zd ZdZdZdefd„Zy)ÚXMLFileWithFilePathTestszJ
    Tests for L{twisted.web.template.XMLFile}'s L{FilePath} support.
    FrD   c                 óž   — t        | j                  «       «      }|j                  | j                  j	                  d«      «       t        |«      S )zŽ
        @return: an L{XMLString} constructed with a L{FilePath} pointing to a
            file that contains C{self.templateString}.
        Úutf8)r   ÚmktempÚ
setContentr¹   Úencoder   ©r,   Úfps     r.   r¦   z&XMLFileWithFilePathTests.loaderFactory,  s;   € ô
 �d—k‘k“mÓ$ˆØ
�‰�d×)Ñ)×0Ñ0°Ó8Ô9Ü�r‹{Ðr0   Nr½   rI   r0   r.   r¿   r¿   %  s   „ ñð €Mð˜ô r0   r¿   c                   ó    — e Zd ZdZdZdefd„Zy)ÚXMLFileWithFileTestszU
    Tests for L{twisted.web.template.XMLFile}'s deprecated file object support.
    TrD   c                 ó>   — t        t        | j                  «      «      S )z{
        @return: an L{XMLString} constructed with a file object that contains
            C{self.templateString}.
        )r   r   r¹   r>   s    r.   r¦   z"XMLFileWithFileTests.loaderFactory=  s   € ô
 ”x × 3Ñ 3Ó4Ó5Ð5r0   Nr½   rI   r0   r.   rÈ   rÈ   6  s   „ ñð €Mð6˜ô 6r0   rÈ   c                   ó    — e Zd ZdZdZdefd„Zy)ÚXMLFileWithFilenameTestszR
    Tests for L{twisted.web.template.XMLFile}'s deprecated filename support.
    TrD   c                 ó²   — t        | j                  «       «      }|j                  | j                  j	                  d«      «       t        |j                  «      S )z‹
        @return: an L{XMLString} constructed with a filename that points to a
            file containing C{self.templateString}.
        rÁ   )r   rÂ   rÃ   r¹   rÄ   r   r–   rÅ   s     r.   r¦   z&XMLFileWithFilenameTests.loaderFactoryL  s@   € ô
 �d—k‘k“mÓ$ˆØ
�‰�d×)Ñ)×0Ñ0°Ó8Ô9Ü�r—w‘wÓÐr0   Nr½   rI   r0   r.   rË   rË   E  s   „ ñð €Mð ˜ô  r0   rË   c                   ó    — e Zd Z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d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dd„Zy)ÚFlattenIntegrationTestsz[
    Tests for integration between L{Element} and
    L{twisted.web._flatten.flatten}.
    Nc                 ód   — g d¢}|D ]'  }| j                  t        t        |«      ¬«      |«       Œ) y)z¾
        Given a series of parsable XML strings, verify that
        L{twisted.web._flatten.flatten} will flatten the L{Element} back to the
        input when sent on a round trip.
        )ó   <p>Hello, world.</p>s   <p><!-- hello, world --></p>s    <p><![CDATA[Hello, world.]]></p>sB   <test1 xmlns:test2="urn:test2"><test2:test3></test2:test3></test1>s0   <test1 xmlns="urn:test2"><test3></test3></test1>ó
   <p>â˜ƒ</p>©r�   N)ÚassertFlattensImmediatelyr   r   )r,   Ú	fragmentsÚxmls      r.   Útest_roundTripz&FlattenIntegrationTests.test_roundTrip\  s5   € ò
ˆ	ð ò 	PˆCØ×*Ñ*¬7¼)ÀC».Ô+IÈ3ÕOñ	Pr0   c                 óR   — t        t        d«      ¬«      }| j                  |d«       y)zx
        When flattening an HTML entity, it should flatten out to the utf-8
        representation if possible.
        z<p>&#9731;</p>rÒ   rÑ   N©r   r   rÓ   ©r,   rO   s     r.   Útest_entityConversionz-FlattenIntegrationTests.test_entityConversionm  s%   € ô
 ¤Ð+;Ó!<Ô=ˆØ×&Ñ& wÐ0FÕGr0   c                 ó@   — | j                  t        «       t        «       y)zk
        Rendering an Element without a loader attribute raises the appropriate
        exception.
        N)ÚassertFlatteningRaisesr   r   r>   s    r.   rR   z2FlattenIntegrationTests.test_missingTemplateLoaderu  s   € ð
 	×#Ñ#¤G£IÔ/DÕEr0   c                 óZ   — t        t        d«      ¬«      }| j                  |t        «       y)zÒ
        Flattening an L{Element} with a C{loader} which has a tag with a render
        directive fails with L{FlattenerError} if there is no available render
        method to satisfy that directive.
        zy
        <p xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1"
          t:render="unknownMethod" />
        rÒ   N)r   r   rÜ   r   rÙ   s     r.   Útest_missingRenderMethodz0FlattenIntegrationTests.test_missingRenderMethod|  s.   € ô Üðóô
ˆð 	×#Ñ# GÔ-@ÕAr0   c                 óR   — t        t        d«      ¬«      }| j                  |d«       y)zw
        A C{transparent} element should be eliminated from the DOM and rendered as
        only its children.
        zk<t:transparent xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1">Hello, world.</t:transparent>rÒ   ó   Hello, world.NrØ   rÙ   s     r.   Útest_transparentRenderingz1FlattenIntegrationTests.test_transparentRenderingŒ  s.   € ô
 Üð#óô
ˆð 	×&Ñ& wÐ0@ÕAr0   c                 óR   — t        t        d«      ¬«      }| j                  |d«       y)z~
        An Element with an attr tag renders the vaule of its attr tag as an
        attribute of its containing tag.
        z‚<a xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1"><t:attr name="href">http://example.com</t:attr>Hello, world.</a>rÒ   s.   <a href="http://example.com">Hello, world.</a>NrØ   rÙ   s     r.   Útest_attrRenderingz*FlattenIntegrationTests.test_attrRendering›  s1   € ô
 Üðóô
ˆð 	×&Ñ&ØÐFõ	
r0   c                 ór   — | j                  t        d«      D �cg c]  }t        d«      ‘Œ c}d«       yc c}w )z–
        When rendering a large number of already-fired Deferreds we should not
        encounter any recursion errors or stack-depth issues.
        éú   Úxsú   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxN)rÓ   Úranger	   )r,   Úis     r.   Ú!test_synchronousDeferredRecursionz9FlattenIntegrationTests.test_synchronousDeferredRecursion¬  s*   € ð
 	×&Ñ&¼eÀC»jÖ'I¸¬°­Ò'IÈ:ÕVùÒ'Is   ™4c                 ó:   — | j                  t        t        d«       y)z{
        A template with a toplevel C{attr} tag will not load; it will raise
        L{AssertionError} if you try.
        z˜<t:attr
            xmlns:t='http://twistedmatrix.com/ns/twisted.web.template/0.1'
            name='something'
            >hello</t:attr>
            N©r;   ÚAssertionErrorr   r>   s    r.   Útest_errorToplevelAttrz.FlattenIntegrationTests.test_errorToplevelAttr³  s   € ð
 	×ÑÜÜðõ	
r0   c                 ó:   — | j                  t        t        d«       y)z�
        A template with an C{attr} tag with no C{name} attribute will not load;
        it will raise L{AssertionError} if you try.
        z{<html><t:attr
            xmlns:t='http://twistedmatrix.com/ns/twisted.web.template/0.1'
            >hello</t:attr></html>Nrë   r>   s    r.   Útest_errorUnnamedAttrz-FlattenIntegrationTests.test_errorUnnamedAttrÂ  s   € ð
 	×ÑÜÜð&õ	
r0   c                 ót   — d}t        t        |«      ¬«      }| j                  ||j                  d«      «       y)zˆ
        If the parser sees a prefix it doesn't recognize on an attribute, it
        will pass it on through to serialization.
        z}<hello:world hello:sample="testing" xmlns:hello="http://made-up.example.com/ns/not-real">This is a made-up tag.</hello:world>rÒ   rÁ   N)r   r   ÚassertFlattensTorÄ   )r,   ÚtheInputrO   s      r.   Útest_lenientPrefixBehaviorz2FlattenIntegrationTests.test_lenientPrefixBehaviorÏ  s6   € ð3ð 	ô
 ¤¨8Ó!4Ô5ˆØ×Ñ˜g x§¡°vÓ'>Õ?r0   c                 ój   —  G d„ dt         «      } |t        d«      ¬«      }| j                  |d«       y)zi
        An Element with a render method which returns a Deferred will render
        correctly.
        c                   ó0   — e Zd Zedee   dedefd„«       Zy)úHFlattenIntegrationTests.test_deferredRendering.<locals>.RenderfulElementrq   r-   rD   c                 ó   — t        d«      S ©Nr«   )r	   rt   s      r.   ÚrenderMethodzUFlattenIntegrationTests.test_deferredRendering.<locals>.RenderfulElement.renderMethodã  s   € ô ˜Ó/Ð/r0   N©	rE   rF   rG   r   r   r   r   r   rù   rI   r0   r.   ÚRenderfulElementrö   â  s1   „ Øð0Ø'¨Ñ1ð0Ø8;ð0àò0ó ñ0r0   rû   úŸ
        <p xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1"
          t:render="renderMethod">
            Goodbye, world.
        </p>
        rÒ   rà   NrØ   ©r,   rû   rO   s      r.   Útest_deferredRenderingz.FlattenIntegrationTests.test_deferredRenderingÜ  s:   € ô	0œwô 	0ñ #Üðóô	
ˆð 	×&Ñ& wÐ0@ÕAr0   c                 óP   —  G d„ dt         «      }| j                   |«       d«       y)z£
        If there is a non-None loader attribute on the class of an Element
        instance but none on the instance itself, the class attribute is used.
        c                   ó   — e Zd Z ed«      Zy)úEFlattenIntegrationTests.test_loaderClassAttribute.<locals>.SubElementr¢   N)rE   rF   rG   r   r�   rI   r0   r.   Ú
SubElementr  û  s   „ ÙÐ5Ó6‰Fr0   r  rÐ   N)r   rÓ   )r,   r  s     r.   Útest_loaderClassAttributez1FlattenIntegrationTests.test_loaderClassAttributeõ  s#   € ô	7œô 	7ð 	×&Ñ&¡z£|Ð5LÕMr0   c                 ót   ‡— g Š G ˆfd„dt         «      } |t        d«      ¬«      }| j                  |d«       y)z�
        An Element with a valid render directive has that directive invoked and
        the result added to the output.
        c                   ó6   •— e Zd Zedee   dedefˆ fd„«       Zy)úIFlattenIntegrationTests.test_directiveRendering.<locals>.RenderfulElementrq   r-   rD   c                 ó:   •— ‰j                  | |f«        |d«      S rø   )Úappend)r,   rq   r-   Úrenderss      €r.   rù   zVFlattenIntegrationTests.test_directiveRendering.<locals>.RenderfulElement.renderMethod  s    ø€ ð —‘  g˜Ô/Ù˜?Ó+Ð+r0   Nrú   )r	  s   €r.   rû   r    s2   ø„ Øð,Ø'¨Ñ1ð,Ø8;ð,àô,ó ñ,r0   rû   úx
        <p xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1"
          t:render="renderMethod" />
        rÒ   rÐ   NrØ   )r,   rû   rO   r	  s      @r.   Útest_directiveRenderingz/FlattenIntegrationTests.test_directiveRendering   sB   ø€ ð
 ˆö	,œwô 	,ñ #Üðóô
ˆð 	×&Ñ& wÐ0GÕHr0   c                 ój   —  G d„ dt         «      } |t        d«      ¬«      }| j                  |d«       y)z‡
        An Element with a render method which omits the containing tag
        successfully removes that tag from the output.
        c                   ó0   — e Zd Zedee   dedefd„«       Zy)úTFlattenIntegrationTests.test_directiveRenderingOmittingTag.<locals>.RenderfulElementrq   r-   rD   c                  ó   — yrø   rI   rt   s      r.   rù   zaFlattenIntegrationTests.test_directiveRenderingOmittingTag.<locals>.RenderfulElement.renderMethod   s   € ð 'r0   Nrú   rI   r0   r.   rû   r    s1   „ Øð'Ø'¨Ñ1ð'Ø8;ð'àò'ó ñ'r0   rû   rü   rÒ   rà   NrØ   rý   s      r.   Ú"test_directiveRenderingOmittingTagz:FlattenIntegrationTests.test_directiveRenderingOmittingTag  s:   € ô	'œwô 	'ñ #Üðóô	
ˆð 	×&Ñ& wÐ0@ÕAr0   c                 ój   —  G d„ dt         «      } |t        d«      ¬«      }| j                  |d«       y)út
        An Element which is returned by the render method of another Element is
        rendered properly.
        c                   ó0   — e Zd Zedee   dedefd„«       Zy)úUFlattenIntegrationTests.test_elementContainingStaticElement.<locals>.RenderfulElementrq   r-   rD   c                 ó8   —  |t        t        d«      ¬«      «      S )Nz<em>Hello, world.</em>rÒ   )r   r   rt   s      r.   rù   zbFlattenIntegrationTests.test_elementContainingStaticElement.<locals>.RenderfulElement.renderMethod9  s   € ñ œ7¬)Ð4LÓ*MÔNÓOÐOr0   Nrú   rI   r0   r.   rû   r  8  s6   „ ØðPØ'¨Ñ1ðPØ8;ðPàòPó ñPr0   rû   r
  rÒ   s   <p><em>Hello, world.</em></p>NrØ   rý   s      r.   Ú#test_elementContainingStaticElementz;FlattenIntegrationTests.test_elementContainingStaticElement2  s<   € ô	Pœwô 	Pñ #Üðóô
ˆð 	×&Ñ& wÐ0PÕQr0   c                 ój   —  G d„ dt         «      } |t        d«      ¬«      }| j                  |d«       y)r  c                   ó0   — e Zd Zedee   dedefd„«       Zy)úHFlattenIntegrationTests.test_elementUsingSlots.<locals>.RenderfulElementrq   r-   rD   c                 ó&   — |j                  d¬«      S )Nzworld.)Útest2)Ú	fillSlotsrt   s      r.   rù   zUFlattenIntegrationTests.test_elementUsingSlots.<locals>.RenderfulElement.renderMethodP  s   € ð —}‘}¨8�}Ó4Ð4r0   Nrú   rI   r0   r.   rû   r  O  s1   „ Øð5Ø'¨Ñ1ð5Ø8;ð5àò5ó ñ5r0   rû   zž<p xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1" t:render="renderMethod"><t:slot name="test1" default="Hello, " /><t:slot name="test2" /></p>rÒ   rÐ   NrØ   rý   s      r.   Útest_elementUsingSlotsz.FlattenIntegrationTests.test_elementUsingSlotsI  s:   € ô	5œwô 	5ñ #Üðóô
ˆð 	×&Ñ& wÐ0GÕHr0   c                 óŽ   ‡—  G ˆfd„dt         «      } G d„ dt         «      Š |t        d«      ¬«      }| j                  |d«       y)	z¿
        Directives in the document factory of an Element returned from a render
        method of another Element are satisfied from the correct object: the
        "inner" Element.
        c                   ó6   •— e Zd Zedee   dedefˆ fd„«       Zy)úRFlattenIntegrationTests.test_elementContainingDynamicElement.<locals>.OuterElementrq   r-   rD   c                 ó4   •—  | ‰t        d«      ¬«      «      S )Nz©
                <t:ignored
                  xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1"
                  t:render="innerMethod" />
                rÒ   )r   )r,   rq   r-   ÚInnerElements      €r.   ÚouterMethodz^FlattenIntegrationTests.test_elementContainingDynamicElement.<locals>.OuterElement.outerMethodi  s%   ø€ áÙ Ü(ðó ôó
ð 
r0   N)	rE   rF   rG   r   r   r   r   r   r#  )r"  s   €r.   ÚOuterElementr   h  s/   ø„ Øð¨8°HÑ+=ð ÀCð ÈKô ó ñr0   r$  c                   ó0   — e Zd Zedee   dedefd„«       Zy)úRFlattenIntegrationTests.test_elementContainingDynamicElement.<locals>.InnerElementrq   r-   rD   c                  ó   — yrø   rI   rt   s      r.   ÚinnerMethodz^FlattenIntegrationTests.test_elementContainingDynamicElement.<locals>.InnerElement.innerMethodx  s   € à&r0   N)	rE   rF   rG   r   r   r   r   r   r(  rI   r0   r.   r"  r&  w  s.   „ Øð'¨8°HÑ+=ð 'ÀCð 'ÈKò 'ó ñ'r0   r"  zw
        <p xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1"
          t:render="outerMethod" />
        rÒ   rÐ   NrØ   )r,   r$  rO   r"  s      @r.   Ú$test_elementContainingDynamicElementz<FlattenIntegrationTests.test_elementContainingDynamicElementa  sG   ø€ ö	œ7ô 	ô	'œ7ô 	'ñ
 Üðóô
ˆð 	×&Ñ& wÐ0GÕHr0   c                 óÊ   ‡‡— t        d«      Š G ˆˆfd„dt        «      Š ‰«       } ‰«       }| j                  |d«       | j                  |d«       | j                  |d«       y)z
        Rendering the output of a loader, or even the same element, should
        return different output each time.
        zœ<p xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1"><t:transparent t:render="classCounter" /> <t:transparent t:render="instanceCounter" /></p>c                   óh   •— e Zd ZdZdZW °Zedee   de	de
fˆ fd„«       Zedee   de	de
fd„«       Zy)úHFlattenIntegrationTests.test_sameLoaderTwice.<locals>.DestructiveElementr   rq   r-   rD   c                 ód   •— ‰xj                   dz  c_          |t        ‰j                   «      «      S ©Nr©   )Úcountr\   )r,   rq   r-   ÚDestructiveElements      €r.   ÚclassCounterzUFlattenIntegrationTests.test_sameLoaderTwice.<locals>.DestructiveElement.classCounter—  s-   ø€ ð #×(Ò(¨AÑ-Õ(Ùœ3Ð1×7Ñ7Ó8Ó9Ð9r0   c                 ób   — | xj                   dz  c_          |t        | j                   «      «      S r.  )ÚinstanceCountr\   rt   s      r.   ÚinstanceCounterzXFlattenIntegrationTests.test_sameLoaderTwice.<locals>.DestructiveElement.instanceCounterž  s+   € ð ×"Ò" aÑ'Õ"Ùœ3˜t×1Ñ1Ó2Ó3Ð3r0   N)rE   rF   rG   r/  r3  r�   r   r   r   r   r   r1  r4  )r0  ÚsharedLoaders   €€r.   r0  r,  ’  sr   ø„ ØˆEØˆMÙ!ˆFàð:Ø'¨Ñ1ð:Ø8;ð:àô:ó ð:ð ð4Ø'¨Ñ1ð4Ø8;ð4àò4ó ñ4r0   r0  s
   <p>1 1</p>s
   <p>2 2</p>s
   <p>3 1</p>N)r   r   rÓ   )r,   Úe1Úe2r0  r5  s      @@r.   Útest_sameLoaderTwicez,FlattenIntegrationTests.test_sameLoaderTwice†  sb   ù€ ô
 !ðó
ˆ÷	4¤ô 	4ñ&  Ó!ˆÙÓ!ˆØ×&Ñ& r¨=Ô9Ø×&Ñ& r¨=Ô9Ø×&Ñ& r¨=Õ9r0   rC   )rE   rF   rG   rH   rÖ   rÚ   rR   rÞ   rá   rã   ré   rí   rï   ró   rþ   r  r  r  r  r  r)  r8  rI   r0   r.   rÎ   rÎ   V  sp   „ ñó
Pó"HóFóBó Bó
ó"Wó
ó
ó@óBó2	NóIó2Bó2Ró.Ió0#IôJ#:r0   rÎ   c                   ó0   — e Zd ZdZdd„Zdd„Zdd„Zdd„Zy)ÚTagLoaderTestsz!
    Tests for L{TagLoader}.
    Nc                 óJ   — t        t        j                  d«      «      | _        y )NÚtest)r   r   rè   r�   r>   s    r.   ÚsetUpzTagLoaderTests.setUp±  s   € Ü¤§¡ v£Ó/ˆ�r0   c                 óV   — | j                  t        t        | j                  «      «       y)zJ
        An instance of L{TagLoader} provides L{ITemplateLoader}.
        N)Ú
assertTruer   r   r�   r>   s    r.   Útest_interfacezTagLoaderTests.test_interface´  s   € ð 	�‰œ¤_°d·k±kÓBÕCr0   c                 ó`   — | j                  | j                  j                  «       t        «       y)zK
        L{TagLoader.load} returns a list, per L{ITemplateLoader}.
        N)ÚassertIsInstancer�   r}   Úlistr>   s    r.   Útest_loadsListzTagLoaderTests.test_loadsListº  s!   € ð 	×Ñ˜dŸk™k×.Ñ.Ó0´$Õ7r0   c                 óR   — t        | j                  «      }| j                  |d«       y)zŽ
        L{TagLoader} can be used in an L{Element}, and flattens as the tag used
        to construct the L{TagLoader} would flatten.
        s   <i>test</i>N)r   r�   rÓ   )r,   Úes     r.   Útest_flattenzTagLoaderTests.test_flattenÀ  s"   € ô
 �D—K‘KÓ ˆØ×&Ñ& q¨.Õ9r0   rC   )rE   rF   rG   rH   r=  r@  rD  rG  rI   r0   r.   r:  r:  ¬  s   „ ñó0óDó8ô:r0   r:  c                   ó    — e Zd ZdZ ed«      Zy)ÚTestElementz:
    An L{Element} that can be rendered successfully.
    zS<p xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1">Hello, world.</p>N)rE   rF   rG   rH   r   r�   rI   r0   r.   rI  rI  É  s   „ ññ ð	ó�Fr0   rI  c                   ó6   — e Zd ZdZ ed«      Zddededdfd„Zy)	ÚTestFailureElementzˆ
    An L{Element} that can be used in place of L{FailureElement} to verify
    that L{renderElement} can render failures properly.
    zO<p xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1">I failed.</p>NÚfailurer�   rD   c                 ó   — || _         y r¤   )rL  )r,   rL  r�   s      r.   Ú__init__zTestFailureElement.__init__á  s	   € Øˆ�r0   r¤   )	rE   rF   rG   rH   r   r�   r   ÚobjectrN  rI   r0   r.   rK  rK  Õ  s2   „ ññ
 ð	ó€Fñ ð °ð À4ô r0   rK  c                   ó&   — e Zd ZdZdee   ddfd„Zy)ÚFailingElementz<
    An element that raises an exception when rendered.
    rq   rD   r   c                 ó   — d}d}||z  › S )Né*   r   rI   )r,   rq   r(   Úbs       r.   rM   zFailingElement.renderê  s   € ØˆØˆØ�q‘&�Ðr0   N)rE   rF   rG   rH   r   r   rM   rI   r0   r.   rQ  rQ  å  s   „ ñð˜h xÑ0ð °]ô r0   rQ  c                   ó   — e Zd ZdZdZy)ÚFakeSitezL
    A minimal L{Site} object that we can use to test displayTracebacks
    FN)rE   rF   rG   rH   ÚdisplayTracebacksrI   r0   r.   rV  rV  ð  s   „ ñð Ñr0   rV  c                   ó$   ‡ — e Zd ZdZdˆ fd„Zˆ xZS )ÚDummyRenderRequestz¢
    A dummy request object that has a C{site} attribute.

    This does not implement the full IRequest interface, but enough of it
    for this test suite.
    c                 óD   •— t         ‰| �  dg«       t        «       | _        y )Nr0   )ÚsuperrN  rV  Úsite)r,   Ú	__class__s    €r.   rN  zDummyRenderRequest.__init__  s   ø€ Ü‰Ñ˜#˜ÔÜ“Jˆ�	r0   rC   )rE   rF   rG   rH   rN  Ú__classcell__)r]  s   @r.   rY  rY  ø  s   ø„ ñ÷ñ r0   rY  c                   ór   — e Zd ZdZd
d„Zded   fd„Zded   fd„Zded   fd„Zded   fd„Z	ded   fd	„Z
y)ÚRenderElementTestsz
    Test L{renderElement}
    rD   Nc                 ó"   — t        «       | _        y)z8
        Set up a common L{DummyRenderRequest}.
        N)rY  rq   r>   s    r.   r=  zRenderElementTests.setUp  s   € ô *Ó+ˆ�r0   c                 óâ   ‡ — t        «       }‰ j                  j                  «       }dt        ddfˆ fd„}|j	                  |«       ‰ j                  t        t        ‰ j                  |«      «       |S )z¢
        L{renderElement} returns NOT_DONE_YET and eventually
        writes the rendered L{Element} to the request before finishing the
        request.
        Ú_rD   Nc                 óº   •— ‰j                  dj                  ‰j                  j                  «      d«       ‰j	                  ‰j                  j
                  «       y )Nr0   s$   <!DOCTYPE html>
<p>Hello, world.</p>)r)   Újoinrq   Úwrittenr?  Úfinished©rc  r,   s    €r.   Úcheckz3RenderElementTests.test_simpleRender.<locals>.check  sB   ø€ Ø×ÑØ—‘˜Ÿ™×-Ñ-Ó.Ø<ôð �O‰O˜DŸL™L×1Ñ1Õ2r0   )rI  rq   ÚnotifyFinishrO  ÚaddCallbackrN   r   r   ©r,   rO   Údri  s   `   r.   Útest_simpleRenderz$RenderElementTests.test_simpleRender  s_   ø€ ô “-ˆà�L‰L×%Ñ%Ó'ˆð	3”Vð 	3 õ 	3ð 	
�‰�eÔà×Ñœ\¬=¸¿¹ÀwÓ+OÔPàˆr0   c                 óâ   ‡ — t        «       }‰ j                  j                  «       }dt        ddfˆ fd„}|j	                  |«       ‰ j                  t        t        ‰ j                  |«      «       |S )z
        L{renderElement} handles failures by writing a minimal
        error message to the request and finishing it.
        rc  rD   Nc                 ó  •— ‰j                  t        «      }‰j                  t        |«      d«       ‰j                  dj	                  ‰j
                  j                  «      d«       ‰j                  ‰j
                  j                  «       y )Nr©   r0   s‚   <!DOCTYPE html>
<div style="font-size:800%;background-color:#FFF;color:#F00">An error occurred while rendering the response.</div>)	ÚflushLoggedErrorsr   r)   r®   re  rq   rf  r?  rg  )rc  Úflushedr,   s     €r.   ri  z4RenderElementTests.test_simpleFailure.<locals>.check1  si   ø€ Ø×,Ñ,¬^Ó<ˆGØ×ÑœS ›\¨1Ô-Ø×ÑØ—‘˜Ÿ™×-Ñ-Ó.ðOô	ð �O‰O˜DŸL™L×1Ñ1Õ2r0   )rQ  rq   rj  rO  rk  rN   r   r   rl  s   `   r.   Útest_simpleFailurez%RenderElementTests.test_simpleFailure(  s`   ø€ ô
 !Ó"ˆà�L‰L×%Ñ%Ó'ˆð	3”Vð 	3 õ 	3ð 	
�‰�eÔà×Ñœ\¬=¸¿¹ÀwÓ+OÔPàˆr0   c                 ó4  ‡ ‡— t        j                  ‰ t        «      Šd‰ j                  j                  _        t        «       }‰ j                  j                  «       }dt        ddfˆˆ fd„}|j                  |«       t        ‰ j                  |t        ¬«       |S )z˜
        L{renderElement} will render a traceback when rendering of
        the element fails and our site is configured to display tracebacks.
        Trc  rD   Nc                 ó   •— ‰j                  dt        ‰«      «       ‰d   d   }‰j                  |j                  t        «       ‰j                  t        «      }‰j                  t        |«      d«       ‰j                  dj                  ‰j                  j                  «      d«       ‰j                  ‰j                  j                  «       y )Nr©   r   Úlog_failurer0   s    <!DOCTYPE html>
<p>I failed.</p>)ÚassertEqualsr®   rB  Úvaluer   rq  r)   re  rq   rf  r?  rg  )rc  Úfrr  ÚlogObserverr,   s      €€r.   ri  zARenderElementTests.test_simpleFailureWithTraceback.<locals>.checkR  s�   ø€ Ø×Ñ˜a¤ [Ó!1Ô2Ø˜A‘˜}Ñ-ˆAØ×!Ñ! !§'¡'¬>Ô:Ø×,Ñ,¬^Ó<ˆGØ×ÑœS ›\¨1Ô-Ø×ÑØ—‘˜Ÿ™×-Ñ-Ó.Ð0Tôð �O‰O˜DŸL™L×1Ñ1Õ2r0   )Ú_failElement)r
   ÚcreateWithCleanupr   rq   r\  rW  rQ  rj  rO  rk  r   rK  )r,   rO   rm  ri  rz  s   `   @r.   Útest_simpleFailureWithTracebackz2RenderElementTests.test_simpleFailureWithTracebackF  s{   ù€ ô
 +×<Ñ<¸TÔCUÓVˆØ.2ˆ�‰×ÑÔ+ä Ó"ˆà�L‰L×%Ñ%Ó'ˆð		3”Vð 		3 ö 		3ð 	
�‰�eÔä�d—l‘l GÔ:LÕMàˆr0   c                 ó¾   ‡ — t        «       }‰ j                  j                  «       }dt        ddfˆ fd„}|j	                  |«       t        ‰ j                  |d¬«       |S )zs
        L{renderElement} will write the doctype string specified by the
        doctype keyword argument.
        rc  rD   Nc                 óp   •— ‰j                  dj                  ‰j                  j                  «      d«       y )Nr0   s‚   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<p>Hello, world.</p>©r)   re  rq   rf  rh  s    €r.   ri  z8RenderElementTests.test_nonDefaultDoctype.<locals>.checkl  s,   ø€ Ø×ÑØ—‘˜Ÿ™×-Ñ-Ó.ð,õr0   sm   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">©Údoctype©rI  rq   rj  rO  rk  r   rl  s   `   r.   Útest_nonDefaultDoctypez)RenderElementTests.test_nonDefaultDoctypec  s^   ø€ ô
 “-ˆà�L‰L×%Ñ%Ó'ˆð	”Vð 	 õ 	ð 	
�‰�eÔäØ�L‰LØðIõ		
ð ˆr0   c                 ó¾   ‡ — t        «       }‰ j                  j                  «       }dt        ddfˆ fd„}|j	                  |«       t        ‰ j                  |d¬«       |S )zs
        L{renderElement} will not write out a doctype if the doctype keyword
        argument is L{None}.
        rc  rD   Nc                 óp   •— ‰j                  dj                  ‰j                  j                  «      d«       y )Nr0   rÐ   r€  rh  s    €r.   ri  z2RenderElementTests.test_noneDoctype.<locals>.checkŒ  s'   ø€ Ø×Ñ˜SŸX™X d§l¡l×&:Ñ&:Ó;Ð=TÕUr0   r�  rƒ  rl  s   `   r.   Útest_noneDoctypez#RenderElementTests.test_noneDoctypeƒ  sW   ø€ ô
 “-ˆà�L‰L×%Ñ%Ó'ˆð	V”Vð 	V õ 	Vð 	
�‰�eÔä�d—l‘l G°TÕ:àˆr0   rC   )rE   rF   rG   rH   r=  r   rn  rs  r}  r„  r‡  rI   r0   r.   r`  r`    s]   „ ñó,ð 8¨D¡>ó ð. H¨T¡Nó ð<°¸$±ó ð:¨°©ó ð@ (¨4¡.ô r0   r`  )FrH   rˆ   Úior   Útypingr   r   Úzope.interfacer   Úzope.interface.verifyr   Útwisted.internet.deferr   r	   Útwisted.internet.testingr
   Útwisted.loggerr   Útwisted.python.failurer   Útwisted.python.filepathr   Útwisted.trial.unittestr   Útwisted.trial.utilr   ÚSUPPRESSÚtwisted.web._elementr   Útwisted.web.errorr   r   r   Útwisted.web.iwebr   r   Útwisted.web.serverr   Útwisted.web.templater   r   r   r   r   r   r   r   r   Útwisted.web.test._utilr    Útwisted.web.test.test_webr!   r¯   rž   r&   rK   r‘   r    r»   r¿   rÈ   rË   rÎ   r:  rI  rK  rQ  rV  rY  r`  rI   r0   r.   ú<module>r›     sS  ðñó Ý ß !å &Ý .ç 4Ý 9Ý -Ý *Ý ,Ý +Ý 3Ý 5ß XÑ Xß 6Ý +÷
÷ 
õ 
õ 3Ý 2áØð?ôÐ ô)@�hô )@ôXeT�8ô eTôP,�xô ,÷>21ñ 21ôj.˜8Ð%8ô .ô˜xÐ)<ô ô"6˜8Ð%8ô 6ô ˜xÐ)<ô  ô"S:˜oô S:ôl
:�_ô :ô:	�'ô 	ô˜ô ô �Wô ÷ñ ñ ˆXÓô
˜ó 
ó ð
ôM˜õ Mr0   