U
    
W[ð  ã                   @   s.   d dl mZ d dlmZ G dd„ dejƒZdS )é    )Úunittest)Úhtmlc                   @   s   e Zd ZdZdd„ ZdS )ÚWebHtmlTestsz-
    Unit tests for L{twisted.web.html}.
    c                    s\   ‡ fdd„}t  d¡ |dƒ t  g ¡ |dƒ t  g ¡ |dƒ t  dd„ ¡ |d	ƒ d
S )zR
        Calls to L{twisted.web.html} members emit a deprecation warning.
        c                    sP   ˆ   ˆ jg¡}ˆ  t|ƒd¡ ˆ  |d d t¡ ˆ  |d d d| f ¡ dS )zF
            Check that a deprecation warning is present.
            é   r   ÚcategoryÚmessagez]twisted.web.html.%s was deprecated in Twisted 15.3.0; please use twisted.web.template insteadN)ZflushWarningsÚtest_deprecationZassertEqualÚlenZassertIdenticalÚDeprecationWarning)ÚmethodZwarningsShown©Úself© ú</usr/lib/python3/dist-packages/twisted/web/test/test_html.pyÚassertDeprecationWarningOf   s    
 ÿ
ÿÿþzAWebHtmlTests.test_deprecation.<locals>.assertDeprecationWarningOfÚ ÚPREÚULÚlinkListc                   S   s   d S )Nr   r   r   r   r   Ú<lambda>*   ó    z/WebHtmlTests.test_deprecation.<locals>.<lambda>ÚoutputN)r   r   r   r   r   )r   r   r   r   r   r      s    


zWebHtmlTests.test_deprecationN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   	   s   r   N)Ztwisted.trialr   Ztwisted.webr   ZTestCaser   r   r   r   r   Ú<module>   s   