U
    n5{iE  ã                   @   s:   d Z ddlZddlmZ ddlmZ G dd„ dejƒZdS )z|
The L{_response} module contains constants for all standard HTTP codes, along
with a mapping to the corresponding phrases.
é    N)Úunittest)Ú
_responsesc                   @   s   e Zd Zddœdd„ZdS )ÚResponseTestsN)Úreturnc                 C   sR   t tƒD ]D}|dkrqtdd„ |D ƒƒrtt|ƒ}|  |t¡ |  |tj¡ qdS )z
        All constants besides C{RESPONSES} defined in L{_response} are
        integers and are keys in C{RESPONSES}.
        Ú	RESPONSESc                 s   s    | ]}|d kp|t jkV  qdS )Ú_N)ÚstringÚascii_uppercase)Ú.0Úc© r   úH/tmp/pip-unpacked-wheel-mnhg7r0q/twisted/web/test/test_web__responses.pyÚ	<genexpr>   s     z/ResponseTests.test_constants.<locals>.<genexpr>N)Údirr   ÚallÚgetattrZassertIsInstanceÚintZassertInr   )ÚselfÚsymÚvalr   r   r   Útest_constants   s    
zResponseTests.test_constants)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   r   )Ú__doc__r   Ztwisted.trialr   Ztwisted.webr   ZTestCaser   r   r   r   r   Ú<module>   s   