§
    Ètºf}A  ã                  ó´  — d Z ddlmZ ddlZddlZddlZddlmZ ddlm	Z	 ddl
mZ ddlmZ  G d„ d	e	j        ¦  «        Z G d
„ de	j        ¦  «        Z G d„ de	j        ¦  «        Z G d„ de	j        ¦  «        Z G d„ de	j        ¦  «        Z G d„ de	j        ¦  «        Z G d„ de	j        ¦  «        Z G d„ de	j        ¦  «        Z G d„ de	j        ¦  «        ZdS )z
HTTP errors.
é    )ÚannotationsN)ÚnativeString)Úunittest)Úerror)ÚTagc                  ó*   — e Zd ZdZdd„Zdd„Zdd„ZdS )	ÚCodeToMessageTestsz<
    L{_codeToMessages} inverts L{_responses.RESPONSES}
    ÚreturnÚNonec                óZ   — t          j        d¦  «        }|                      |d¦  «         d S )Nó   302s   Found©r   Ú_codeToMessageÚassertEqual©ÚselfÚms     úZ/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/web/test/test_error.pyÚtest_validCodez!CodeToMessageTests.test_validCode   s.   € ÝÔ  Ñ(Ô(ˆØ×Ò˜˜HÑ%Ô%Ð%Ð%Ð%ó    c                óZ   — t          j        d¦  «        }|                      |d ¦  «         d S )Ns   987r   r   s     r   Útest_invalidCodez#CodeToMessageTests.test_invalidCode   s.   € ÝÔ  Ñ(Ô(ˆØ×Ò˜˜DÑ!Ô!Ð!Ð!Ð!r   c                óZ   — t          j        d¦  «        }|                      |d ¦  «         d S )Ns   InvalidCoder   r   s     r   Útest_nonintegerCodez&CodeToMessageTests.test_nonintegerCode!   s.   € ÝÔ  Ñ0Ô0ˆØ×Ò˜˜DÑ!Ô!Ð!Ð!Ð!r   N©r
   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   © r   r   r	   r	      sZ   € € € € € ðð ð&ð &ð &ð &ð"ð "ð "ð "ð"ð "ð "ð "ð "ð "r   r	   c                  ó:   — e Zd ZdZd
d„Zd
d„Zd
d„Zd
d„Zd
d„Zd	S )Ú
ErrorTestsz<
    Tests for how L{Error} attributes are initialized.
    r
   r   c                óª   — t          j        d¦  «        }|                      |j        d¦  «         |                      t	          |¦  «        d¦  «         dS )zÐ
        If no C{message} argument is passed to the L{Error} constructor and the
        C{code} argument is a valid HTTP status code, C{message} is set to the
        HTTP reason phrase for C{code}.
        ó   200ó   OKú200 OKN©r   ÚErrorr   ÚmessageÚstr©r   Úes     r   Útest_noMessageValidStatusz$ErrorTests.test_noMessageValidStatus+   sM   € õ ŒK˜ÑÔˆØ×Ò˜œ EÑ*Ô*Ð*Ø×Ò�˜Q™œ Ñ*Ô*Ð*Ð*Ð*r   c                óª   — t          j        d¦  «        }|                      |j        d¦  «         |                      t	          |¦  «        d¦  «         dS )zŸ
        If no C{message} argument is passed to the L{Error} constructor and
        C{code} isn't a known HTTP status code, C{message} stays L{None}.
        ó   999NÚ999r'   r+   s     r   Útest_noMessageForStatusz"ErrorTests.test_noMessageForStatus5   sM   € õ
 ŒK˜ÑÔˆØ×Ò˜œ DÑ)Ô)Ð)Ø×Ò�˜Q™œ Ñ'Ô'Ð'Ð'Ð'r   c                ó”   — |                       t          ¦  «        5  t          j        d¦  «         ddd¦  «         dS # 1 swxY w Y   dS )z†
        If C{code} isn't plausibly an HTTP status code (i.e., composed of
        digits) it is rejected with L{ValueError}.
        s   InvalidStatusN)ÚassertRaisesÚ
ValueErrorr   r(   ©r   s    r   Útest_invalidStatuszErrorTests.test_invalidStatus>   s�   € ð
 ×Ò�zÑ*Ô*ð 	*ð 	*ÝŒKÐ(Ñ)Ô)Ð)ð	*ð 	*ð 	*ñ 	*ô 	*ð 	*ð 	*ð 	*ð 	*ð 	*ð 	*ð 	*øøøð 	*ð 	*ð 	*ð 	*ð 	*ð 	*s   ›=½AÁAc                ó¬   — t          j        dd¦  «        }|                      |j        d¦  «         |                      t	          |¦  «        d¦  «         dS )z’
        If a C{message} argument is passed to the L{Error} constructor, the
        C{message} isn't affected by the value of C{status}.
        r$   ó   My own messagez200 My own messageNr'   r+   s     r   Útest_messageExistszErrorTests.test_messageExistsF   sR   € õ
 ŒK˜Ð 1Ñ2Ô2ˆØ×Ò˜œÐ$5Ñ6Ô6Ð6Ø×Ò�˜Q™œÐ!5Ñ6Ô6Ð6Ð6Ð6r   c                óæ   — t          j        dd¦  «        }|                      t          |¦  «        d¦  «         t          j        dd¦  «        }|                      t          |¦  «        d¦  «         dS )zh
        C{str()} on an L{Error} returns the code and message it was
        instantiated with.
        r$   r%   r&   éÈ   N)r   r(   r   r*   r+   s     r   Útest_strzErrorTests.test_strO   sf   € õ ŒK˜ Ñ&Ô&ˆØ×Ò�˜Q™œ Ñ*Ô*Ð*õ ŒK˜˜UÑ#Ô#ˆØ×Ò�˜Q™œ Ñ*Ô*Ð*Ð*Ð*r   Nr   )	r   r   r   r   r-   r1   r6   r9   r<   r    r   r   r"   r"   &   s‚   € € € € € ðð ð+ð +ð +ð +ð(ð (ð (ð (ð*ð *ð *ð *ð7ð 7ð 7ð 7ð+ð +ð +ð +ð +ð +r   r"   c                  ó:   — e Zd ZdZd
d„Zd
d„Zd
d„Zd
d„Zd
d„Zd	S )ÚPageRedirectTestszC
    Tests for how L{PageRedirect} attributes are initialized.
    r
   r   c                óh   — t          j        dd¬¦  «        }|                      |j        d¦  «         dS )zé
        If no C{message} argument is passed to the L{PageRedirect} constructor
        and the C{code} argument is a valid HTTP status code, C{code} is mapped
        to a descriptive string to which C{message} is assigned.
        r$   ó   /foo©Úlocationó
   OK to /fooN©r   ÚPageRedirectr   r)   r+   s     r   r-   z+PageRedirectTests.test_noMessageValidStatusb   s7   € õ Ô˜v°Ð8Ñ8Ô8ˆØ×Ò˜œ MÑ2Ô2Ð2Ð2Ð2r   c                ód   — t          j        d¦  «        }|                      |j        d¦  «         dS )a;  
        If no C{message} argument is passed to the L{PageRedirect} constructor
        and C{location} is also empty and the C{code} argument is a valid HTTP
        status code, C{code} is mapped to a descriptive string to which
        C{message} is assigned without trying to include an empty location.
        r$   r%   NrD   r+   s     r   Ú#test_noMessageValidStatusNoLocationz5PageRedirectTests.test_noMessageValidStatusNoLocationk   s2   € õ Ô˜vÑ&Ô&ˆØ×Ò˜œ EÑ*Ô*Ð*Ð*Ð*r   c                óh   — t          j        dd¬¦  «        }|                      |j        d¦  «         dS )z¦
        If no C{message} argument is passed to the L{PageRedirect} constructor
        and C{code} isn't a valid HTTP status code, C{message} stays L{None}.
        r/   r@   rA   NrD   r+   s     r   Ú)test_noMessageInvalidStatusLocationExistsz;PageRedirectTests.test_noMessageInvalidStatusLocationExistsu   s7   € õ
 Ô˜v°Ð8Ñ8Ô8ˆØ×Ò˜œ DÑ)Ô)Ð)Ð)Ð)r   c                ój   — t          j        ddd¬¦  «        }|                      |j        d¦  «         dS )z™
        If a C{message} argument is passed to the L{PageRedirect} constructor,
        the C{message} isn't affected by the value of C{status}.
        r$   r8   r@   rA   ó   My own message to /fooNrD   r+   s     r   Ú test_messageExistsLocationExistsz2PageRedirectTests.test_messageExistsLocationExists}   s;   € õ
 Ô˜vÐ'8À7ÐKÑKÔKˆØ×Ò˜œÐ$=Ñ>Ô>Ð>Ð>Ð>r   c                óf   — t          j        dd¦  «        }|                      |j        d¦  «         dS )zº
        If a C{message} argument is passed to the L{PageRedirect} constructor
        and no location is provided, C{message} doesn't try to include the
        empty location.
        r$   r8   NrD   r+   s     r   Útest_messageExistsNoLocationz.PageRedirectTests.test_messageExistsNoLocation…   s6   € õ Ô˜vÐ'8Ñ9Ô9ˆØ×Ò˜œÐ$5Ñ6Ô6Ð6Ð6Ð6r   Nr   ©	r   r   r   r   r-   rG   rI   rL   rN   r    r   r   r>   r>   ]   s‚   € € € € € ðð ð3ð 3ð 3ð 3ð+ð +ð +ð +ð*ð *ð *ð *ð?ð ?ð ?ð ?ð7ð 7ð 7ð 7ð 7ð 7r   r>   c                  ó:   — e Zd ZdZd
d„Zd
d„Zd
d„Zd
d„Zd
d„Zd	S )ÚInfiniteRedirectionTestszJ
    Tests for how L{InfiniteRedirection} attributes are initialized.
    r
   r   c                óh   — t          j        dd¬¦  «        }|                      |j        d¦  «         dS )zø
        If no C{message} argument is passed to the L{InfiniteRedirection}
        constructor and the C{code} argument is a valid HTTP status code,
        C{code} is mapped to a descriptive string to which C{message} is
        assigned.
        r$   r@   rA   rC   N©r   ÚInfiniteRedirectionr   r)   r+   s     r   r-   z2InfiniteRedirectionTests.test_noMessageValidStatus”   s7   € õ Ô% f°wÐ?Ñ?Ô?ˆØ×Ò˜œ MÑ2Ô2Ð2Ð2Ð2r   c                ód   — t          j        d¦  «        }|                      |j        d¦  «         dS )aJ  
        If no C{message} argument is passed to the L{InfiniteRedirection}
        constructor and C{location} is also empty and the C{code} argument is a
        valid HTTP status code, C{code} is mapped to a descriptive string to
        which C{message} is assigned without trying to include an empty
        location.
        r$   r%   NrS   r+   s     r   rG   z<InfiniteRedirectionTests.test_noMessageValidStatusNoLocationž   s2   € õ Ô% fÑ-Ô-ˆØ×Ò˜œ EÑ*Ô*Ð*Ð*Ð*r   c                ó®   — t          j        dd¬¦  «        }|                      |j        d¦  «         |                      t	          |¦  «        d¦  «         dS )zµ
        If no C{message} argument is passed to the L{InfiniteRedirection}
        constructor and C{code} isn't a valid HTTP status code, C{message} stays
        L{None}.
        r/   r@   rA   Nr0   )r   rT   r   r)   r*   r+   s     r   rI   zBInfiniteRedirectionTests.test_noMessageInvalidStatusLocationExists©   sS   € õ Ô% f°wÐ?Ñ?Ô?ˆØ×Ò˜œ DÑ)Ô)Ð)Ø×Ò�˜Q™œ Ñ'Ô'Ð'Ð'Ð'r   c                ój   — t          j        ddd¬¦  «        }|                      |j        d¦  «         dS )z 
        If a C{message} argument is passed to the L{InfiniteRedirection}
        constructor, the C{message} isn't affected by the value of C{status}.
        r$   r8   r@   rA   rK   NrS   r+   s     r   rL   z9InfiniteRedirectionTests.test_messageExistsLocationExists³   s;   € õ
 Ô% fÐ.?È'ÐRÑRÔRˆØ×Ò˜œÐ$=Ñ>Ô>Ð>Ð>Ð>r   c                óf   — t          j        dd¦  «        }|                      |j        d¦  «         dS )zÁ
        If a C{message} argument is passed to the L{InfiniteRedirection}
        constructor and no location is provided, C{message} doesn't try to
        include the empty location.
        r$   r8   NrS   r+   s     r   rN   z5InfiniteRedirectionTests.test_messageExistsNoLocation»   s6   € õ Ô% fÐ.?Ñ@Ô@ˆØ×Ò˜œÐ$5Ñ6Ô6Ð6Ð6Ð6r   Nr   rO   r    r   r   rQ   rQ   �   s‚   € € € € € ðð ð3ð 3ð 3ð 3ð	+ð 	+ð 	+ð 	+ð(ð (ð (ð (ð?ð ?ð ?ð ?ð7ð 7ð 7ð 7ð 7ð 7r   rQ   c                  ó   — e Zd ZdZdd„ZdS )ÚRedirectWithNoLocationTestszq
    L{RedirectWithNoLocation} is a subclass of L{Error} which sets
    a custom message in the constructor.
    r
   r   c                óž   — t          j        ddd¦  «        }|                      |j        d¦  «         |                      |j        d¦  «         dS )z»
        When C{code}, C{message}, and C{uri} are passed to the
        L{RedirectWithNoLocation} constructor, the C{message} and C{uri}
        attributes are set, respectively.
        r   s   REDIRECTs   https://example.coms   REDIRECT to https://example.comN)r   ÚRedirectWithNoLocationr   r)   Úurir+   s     r   Útest_validMessagez-RedirectWithNoLocationTests.test_validMessageË   sQ   € õ Ô(¨°Ð>TÑUÔUˆØ×Ò˜œÐ$FÑGÔGÐGØ×Ò˜œÐ 6Ñ7Ô7Ð7Ð7Ð7r   Nr   )r   r   r   r   r^   r    r   r   rZ   rZ   Å   s2   € € € € € ðð ð
8ð 8ð 8ð 8ð 8ð 8r   rZ   c                  ó"   — e Zd ZdZdd„Zdd„ZdS )ÚMissingRenderMethodTestsz\
    Tests for how L{MissingRenderMethod} exceptions are initialized and
    displayed.
    r
   r   c                ó¸   — t          ¦   «         }t          j        |d¦  «        }|                      |j        |¦  «         |                      |j        d¦  «         dS )zª
        Given C{element} and C{renderName} arguments, the
        L{MissingRenderMethod} constructor assigns the values to the
        corresponding attributes.
        ÚrenderThingN)Úobjectr   ÚMissingRenderMethodÚassertIsÚelementÚ
renderName©r   Úeltr,   s      r   Útest_constructorz)MissingRenderMethodTests.test_constructorÜ   sQ   € õ ‰hŒhˆÝÔ% c¨=Ñ9Ô9ˆØ�Š�a”i Ñ%Ô%Ð%Ø�Š�a”l MÑ2Ô2Ð2Ð2Ð2r   c                ó˜   — t          ¦   «         }t          j        |d¦  «        }|                      t	          |¦  «        d|z  ¦  «         dS )z”
        A L{MissingRenderMethod} is represented using a custom string
        containing the element's representation and the method name.
        rb   zB'MissingRenderMethod': %r had no render method named 'renderThing'N)rc   r   rd   r   Úreprrh   s      r   Ú	test_reprz"MissingRenderMethodTests.test_reprç   sU   € õ
 ‰hŒhˆÝÔ% c¨=Ñ9Ô9ˆØ×ÒÝ�‰GŒGØTØññ	
ô 	
ð 	
ð 	
ð 	
r   Nr   ©r   r   r   r   rj   rm   r    r   r   r`   r`   Ö   sF   € € € € € ðð ð
	3ð 	3ð 	3ð 	3ð
ð 
ð 
ð 
ð 
ð 
r   r`   c                  ó"   — e Zd ZdZdd„Zdd„ZdS )ÚMissingTemplateLoaderTestsz^
    Tests for how L{MissingTemplateLoader} exceptions are initialized and
    displayed.
    r
   r   c                ó€   — t          ¦   «         }t          j        |¦  «        }|                      |j        |¦  «         dS )z’
        Given an C{element} argument, the L{MissingTemplateLoader} constructor
        assigns the value to the corresponding attribute.
        N)rc   r   ÚMissingTemplateLoaderre   rf   rh   s      r   rj   z+MissingTemplateLoaderTests.test_constructorû   s9   € õ
 ‰hŒhˆÝÔ'¨Ñ,Ô,ˆØ�Š�a”i Ñ%Ô%Ð%Ð%Ð%r   c                ó–   — t          ¦   «         }t          j        |¦  «        }|                      t	          |¦  «        d|z  ¦  «         dS )z–
        A L{MissingTemplateLoader} is represented using a custom string
        containing the element's representation and the method name.
        z)'MissingTemplateLoader': %r had no loaderN)rc   r   rr   r   rl   rh   s      r   rm   z$MissingTemplateLoaderTests.test_repr  sF   € õ
 ‰hŒhˆÝÔ'¨Ñ,Ô,ˆØ×Ò�˜a™œÐ"MÐPSÑ"SÑTÔTÐTÐTÐTr   Nr   rn   r    r   r   rp   rp   õ   sL   € € € € € ðð ð
&ð &ð &ð &ðUð Uð Uð Uð Uð Ur   rp   c                  óŽ   — e Zd ZdZg f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S )ÚFlattenerErrorTestsz&
    Tests for L{FlattenerError}.
    Úrootsúlist[object]r
   úerror.FlattenerErrorc                óÒ   — 	 t          d¦  «        ‚# t          $ rK}t          j        t	          j        ¦   «         d         ¦  «        }t          j        |||¦  «        cY d }~S d }~ww xY w)Núoh noesé   )ÚRuntimeErrorÚ	ExceptionÚ	tracebackÚ
extract_tbÚsysÚexc_infor   ÚFlattenerError)r   rv   r,   Útbs       r   ÚmakeFlattenerErrorz&FlattenerErrorTests.makeFlattenerError  ss   € ð	6Ý˜yÑ)Ô)Ð)øÝð 	6ð 	6ð 	6ÝÔ%¥c¤l¡n¤n°QÔ&7Ñ8Ô8ˆBÝÔ'¨¨5°"Ñ5Ô5Ð5Ð5Ð5Ð5Ð5Ð5øøøøð	6øøøs   ‚ ‘
A&›A A!ÁA&Á!A&Úobjrc   r*   c                ó   — d|z  S )NzR(%s)r    )r   r…   s     r   ÚfakeFormatRootz"FlattenerErrorTests.fakeFormatRoot  s   € Ø˜‰}Ðr   r   c                óp   — |                       ddg¬¦  «        }|                      |j        ddg¦  «         dS )z«
        Given C{exception}, C{roots}, and C{traceback} arguments, the
        L{FlattenerError} constructor assigns the roots to the C{_roots}
        attribute.
        ÚaÚb)rv   N)r„   r   Ú_rootsr+   s     r   rj   z$FlattenerErrorTests.test_constructor  s@   € ð ×#Ò#¨3°¨*Ð#Ñ5Ô5ˆØ×Ò˜œ C¨ :Ñ.Ô.Ð.Ð.Ð.r   c                óŽ   — |                       ¦   «         }|                      t          |¦  «        t          |¦  «        ¦  «         dS )zd
        The string form of a L{FlattenerError} is identical to its
        representation.
        N)r„   r   r*   rl   r+   s     r   r<   zFlattenerErrorTests.test_str&  s=   € ð
 ×#Ò#Ñ%Ô%ˆØ×Ò�˜Q™œ¥ a¡¤Ñ)Ô)Ð)Ð)Ð)r   c                ó  — |                       ddg¦  «        }| j        |_        |                      t	          j        dt          |¦  «        t          j        t          j        z  ¦  «        t          |¦  «        ¦  «         dS )z×
        The representation of a L{FlattenerError} initialized with roots and a
        traceback contains a formatted representation of those roots (using
        C{_formatRoot}) and a formatted traceback.
        r‰   rŠ   zœException while flattening:
  R\(a\)
  R\(b\)
  File "[^"]*", line [0-9]*, in makeFlattenerError
    raise RuntimeError\("oh noes"\)
RuntimeError: oh noes
$N)	r„   r‡   Ú_formatRootÚ
assertTrueÚreÚmatchrl   ÚMÚSr+   s     r   Ú"test_reprWithRootsAndWithTracebackz6FlattenerErrorTests.test_reprWithRootsAndWithTraceback.  sz   € ð ×#Ò# S¨# JÑ/Ô/ˆØÔ+ˆŒØ�ŠÝŒHð+õ �Q‘”Ý”•r”t‘ñ	ô 	õ �‰GŒGñ	
ô 	
ð 	
ð 	
ð 	
r   c                óæ   — |                       g ¦  «        }|                      t          j        dt	          |¦  «        t          j        t          j        z  ¦  «        t	          |¦  «        ¦  «         dS )úŸ
        The representation of a L{FlattenerError} initialized without roots but
        with a traceback contains a formatted traceback but no roots.
        zŠException while flattening:
  File "[^"]*", line [0-9]*, in makeFlattenerError
    raise RuntimeError\("oh noes"\)
RuntimeError: oh noes
$N)r„   r�   r�   r‘   rl   r’   r“   r+   s     r   Ú%test_reprWithoutRootsAndWithTracebackz9FlattenerErrorTests.test_reprWithoutRootsAndWithTracebackD  sl   € ð
 ×#Ò# BÑ'Ô'ˆØ�ŠÝŒHð+õ �Q‘”Ý”•r”t‘ñô õ �‰GŒGñ
	
ô 
	
ð 
	
ð 
	
ð 
	
r   c                ó  — t          j        t          d¦  «        g d¦  «        }|                      t	          j        dt          |¦  «        t          j        t          j        z  ¦  «        t          |¦  «        ¦  «         dS )r–   rz   Nz3Exception while flattening:
RuntimeError: oh noes
$)	r   r‚   r|   r�   r�   r‘   rl   r’   r“   r+   s     r   Ú(test_reprWithoutRootsAndWithoutTracebackz<FlattenerErrorTests.test_reprWithoutRootsAndWithoutTracebackV  sq   € õ
 Ô ¥¨iÑ!8Ô!8¸"¸dÑCÔCˆØ�ŠÝŒHØJÝ�Q‘”Ý”•r”t‘ñô õ
 �‰GŒGñ	
ô 	
ð 	
ð 	
ð 	
r   c                ó´   — |                       ¦   «         }|                      |                     t          d¦  «        ¦  «        t	          d¦  «        ¦  «         dS )zk
        The C{_formatRoot} method formats a short unicode string using the
        built-in repr.
        ÚabcdN)r„   r   rŽ   r   rl   r+   s     r   Ú!test_formatRootShortUnicodeStringz5FlattenerErrorTests.test_formatRootShortUnicodeStringe  sK   € ð
 ×#Ò#Ñ%Ô%ˆØ×Ò˜Ÿš¥|°FÑ';Ô';Ñ<Ô<½dÀ6¹l¼lÑKÔKÐKÐKÐKr   c                ó¸   — |                       ¦   «         }t          d¦  «        }|                      |                     |¦  «        t	          d¦  «        ¦  «         dS )z{
        The C{_formatRoot} method formats a long unicode string using the
        built-in repr with an ellipsis.
        zxabcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-z-abcde-abcde-abcde-ab<...>e-abcde-abcde-abcde-N)r„   r   r   rŽ   rl   ©r   r,   Ú
longStrings      r   Ú test_formatRootLongUnicodeStringz4FlattenerErrorTests.test_formatRootLongUnicodeStringm  s_   € ð
 ×#Ò#Ñ%Ô%ˆÝ! -Ñ0Ô0ˆ
Ø×ÒØ�MŠM˜*Ñ%Ô%ÝÐ@ÑAÔAñ	
ô 	
ð 	
ð 	
ð 	
r   c                óš   — |                       ¦   «         }|                      |                     d¦  «        t          d¦  «        ¦  «         dS )zh
        The C{_formatRoot} method formats a short byte string using the
        built-in repr.
        s   abcdN©r„   r   rŽ   rl   r+   s     r   Útest_formatRootShortByteStringz2FlattenerErrorTests.test_formatRootShortByteStringy  sC   € ð
 ×#Ò#Ñ%Ô%ˆØ×Ò˜Ÿš wÑ/Ô/µ°g±´Ñ?Ô?Ð?Ð?Ð?r   c                óž   — |                       ¦   «         }d}|                      |                     |¦  «        t          d¦  «        ¦  «         dS )zx
        The C{_formatRoot} method formats a long byte string using the
        built-in repr with an ellipsis.
        sx   abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-abcde-s-   abcde-abcde-abcde-ab<...>e-abcde-abcde-abcde-Nr¢   rž   s      r   Útest_formatRootLongByteStringz1FlattenerErrorTests.test_formatRootLongByteString�  sW   € ð
 ×#Ò#Ñ%Ô%ˆØ#ˆ
Ø×ÒØ�MŠM˜*Ñ%Ô%ÝÐAÑBÔBñ	
ô 	
ð 	
ð 	
ð 	
r   c                óš   — |                       ¦   «         }|                      |                     t          d¦  «        ¦  «        d¦  «         dS )zu
        The C{_formatRoot} method formats a C{Tag} with no filename information
        as 'Tag <tagName>'.
        úa-tagzTag <a-tag>N)r„   r   rŽ   r   r+   s     r   Útest_formatRootTagNoFilenamez0FlattenerErrorTests.test_formatRootTagNoFilename�  sC   € ð
 ×#Ò#Ñ%Ô%ˆØ×Ò˜Ÿš¥s¨7¡|¤|Ñ4Ô4°mÑDÔDÐDÐDÐDr   c                ó¦   — |                       ¦   «         }t          dddd¬¦  «        }|                      |                     |¦  «        d¦  «         dS )z”
        The C{_formatRoot} method formats a C{Tag} with filename information
        using the filename, line, column, and tag information
        r§   ztpl.pyé
   é   )ÚfilenameÚ
lineNumberÚcolumnNumberz-File "tpl.py", line 10, column 20, in "a-tag"N)r„   r   r   rŽ   )r   r,   Úts      r   Útest_formatRootTagWithFilenamez2FlattenerErrorTests.test_formatRootTagWithFilename•  s_   € ð
 ×#Ò#Ñ%Ô%ˆÝ� (°rÈÐKÑKÔKˆØ×ÒØ�MŠM˜!ÑÔÐMñ	
ô 	
ð 	
ð 	
ð 	
r   c           	     ó  — |                       t          t          j        t	          d¦  «        dgg ¦  «        ¦  «        d¦  «         |                       t          t          j        t	          d¦  «        dgg ¦  «        ¦  «        d¦  «         dS )zº
        If a L{FlattenerError} is created with a string root, up to around 40
        bytes from that string are included in the string representation of the
        exception.
        ÚreasonÚ	abc123xyzz?Exception while flattening:
  'abc123xyz'
RuntimeError: reason
Úd0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789zcException while flattening:
  '01234567890123456789<...>01234567890123456789'
RuntimeError: reason
N©r   r*   r   r‚   r|   r5   s    r   Útest_stringzFlattenerErrorTests.test_string   s“   € ð 	×ÒÝ•Ô$¥\°(Ñ%;Ô%;¸k¸]ÈBÑOÔOÑPÔPØVñ	
ô 	
ð 	
ð 	×ÒÝ•Ô$¥\°(Ñ%;Ô%;Ð>OÐ=PÐRTÑUÔUÑVÔVð%ñ	
ô 	
ð 	
ð 	
ð 	
r   c           	     ó  — |                       t          t          j        t	          d¦  «        dgg ¦  «        ¦  «        d¦  «         |                       t          t          j        t	          d¦  «        dgg ¦  «        ¦  «        d¦  «         dS )zÀ
        If a L{FlattenerError} is created with a unicode root, up to around 40
        characters from that string are included in the string representation
        of the exception.
        r²   u	   abcâ˜ƒxyzzBException while flattening:
  'abc\u2603xyz'
RuntimeError: reason
ux   01234567â˜ƒ901234567â˜ƒ901234567â˜ƒ901234567â˜ƒ901234567â˜ƒ901234567â˜ƒ901234567â˜ƒ901234567â˜ƒ901234567â˜ƒ901234567â˜ƒ9zwException while flattening:
  '01234567\u2603901234567\u26039<...>01234567\u2603901234567\u26039'
RuntimeError: reason
Nrµ   r5   s    r   Útest_unicodez FlattenerErrorTests.test_unicode²  s¦   € ð 	×ÒÝÝÔ$¥\°(Ñ%;Ô%;Ð>QÐ=RÐTVÑWÔWñô ð%ñ		
ô 	
ð 	
ð 	×ÒÝÝÔ$Ý  Ñ*Ô*Ð-HÐ,IÈ2ñô ñô ð
%ñ	
ô 	
ð 	
ð 	
ð 	
r   N)rv   rw   r
   rx   )r…   rc   r
   r*   r   )r   r   r   r   r„   r‡   rj   r<   r”   r—   r™   rœ   r    r£   r¥   r¨   r°   r¶   r¸   r    r   r   ru   ru     s`  € € € € € ðð ð 8:ð 6ð 6ð 6ð 6ð 6ðð ð ð ð/ð /ð /ð /ð*ð *ð *ð *ð
ð 
ð 
ð 
ð,
ð 
ð 
ð 
ð$
ð 
ð 
ð 
ðLð Lð Lð Lð

ð 

ð 

ð 

ð@ð @ð @ð @ð

ð 

ð 

ð 

ðEð Eð Eð Eð	
ð 	
ð 	
ð 	
ð
ð 
ð 
ð 
ð$
ð 
ð 
ð 
ð 
ð 
r   ru   c                  ó   — e Zd ZdZdd„ZdS )ÚUnsupportedMethodTestsz)
    Tests for L{UnsupportedMethod}.
    r
   r   c                óx   — t          j        ddg¦  «        }|                      t          |¦  «        d¦  «         dS )z´
        The C{__str__} for L{UnsupportedMethod} makes it clear that what it
        shows is a list of the supported methods, not the method that was
        unsupported.
        s   HEADs   PATCHz#Expected one of [b'HEAD', b'PATCH']N)r   ÚUnsupportedMethodr   r*   r+   s     r   r<   zUnsupportedMethodTests.test_strÓ  sG   € õ Ô# W¨hÐ$7Ñ8Ô8ˆØ×ÒÝ�‰FŒFØ1ñ	
ô 	
ð 	
ð 	
ð 	
r   Nr   )r   r   r   r   r<   r    r   r   rº   rº   Î  s2   € € € € € ðð ð

ð 

ð 

ð 

ð 

ð 

r   rº   )r   Ú
__future__r   r�   r€   r~   Útwisted.python.compatr   Útwisted.trialr   Útwisted.webr   Útwisted.web.templater   ÚTestCaser	   r"   r>   rQ   rZ   r`   rp   ru   ÚSynchronousTestCaserº   r    r   r   ú<module>rÄ      s<  ððð ð #Ð "Ð "Ð "Ð "Ð "à 	€	€	€	Ø 
€
€
€
Ø Ð Ð Ð à .Ð .Ð .Ð .Ð .Ð .Ø "Ð "Ð "Ð "Ð "Ð "Ø Ð Ð Ð Ð Ð Ø $Ð $Ð $Ð $Ð $Ð $ð"ð "ð "ð "ð "˜Ô*ñ "ô "ð "ð$4+ð 4+ð 4+ð 4+ð 4+�Ô"ñ 4+ô 4+ð 4+ðn/7ð /7ð /7ð /7ð /7˜Ô)ñ /7ô /7ð /7ðd37ð 37ð 37ð 37ð 37˜xÔ0ñ 37ô 37ð 37ðl8ð 8ð 8ð 8ð 8 (Ô"3ñ 8ô 8ð 8ð"
ð 
ð 
ð 
ð 
˜xÔ0ñ 
ô 
ð 
ð>Uð Uð Uð Uð U Ô!2ñ Uô Uð Uð2}
ð }
ð }
ð }
ð }
˜(Ô+ñ }
ô }
ð }
ð@
ð 
ð 
ð 
ð 
˜XÔ9ñ 
ô 
ð 
ð 
ð 
r   