%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/twisted/web/test/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/twisted/web/test/__pycache__/test_http_headers.cpython-312.pyc |
� Ϫ�f�a � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m Z mZmZ dd�Z G d� d e� Z G d � de� Z G d� d e� Zy)z( Tests for L{twisted.web.http_headers}. � )�annotations)�Sequence)�TestCase)�Headers)�bytesLinearWhitespaceComponents�sanitizedBytes�textLinearWhitespaceComponentsc � � |D ]� }g }|j t ||gi� � t � }|j ||� |j |� t � }|j ||g� |j |� |D ]Q }| j t |j � � ||gfg� | j |j |� |g� �S �� y)a Assert that the components are sanitized to the expected value as both a header name and value, across all of L{Header}'s setters and getters. @param testCase: A test case. @param components: A sequence of values that contain linear whitespace to use as header names and values; see C{textLinearWhitespaceComponents} and C{bytesLinearWhitespaceComponents} @param expected: The expected sanitized form of the component for both headers names and their values. N)�appendr �addRawHeader� setRawHeaders�assertEqual�list�getAllRawHeaders� getRawHeaders)�testCase� components�expected� component�headers�added� setHeader�headers �D/usr/lib/python3/dist-packages/twisted/web/test/test_http_headers.py�assertSanitizedr s� � �$ � M� ������w� �I�;�7�8�9�� �� ���9�i�0����u���I� ���� �I�;�7����y�!�� M�F�� � ��V�,�,�.�/�8�h�Z�2H�1I� � � � ��!5�!5�h�!?�(��L� M�M� c �� � e Zd ZdZdd�Zdd�Zdd�Zdd�Zdd�Zdd�Z dd�Z dd �Zdd �Zdd�Z dd�Zdd �Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zy)�BytesHeadersTestszE Tests for L{Headers}, using L{bytes} arguments for methods. c �. � t | t t � y�zf Linear whitespace in header names or values is replaced with a single space. N)r r r ��selfs r �test_sanitizeLinearWhitespacez/BytesHeadersTests.test_sanitizeLinearWhitespace>