Ë
    ¹2ÚiW  ã                   ó,   — d dl mZ  G d„ de«      Zd„ Zy)é    )ÚXSendfileResponsec                   ó4   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	y)	ÚXSendfileValidatorzzUtility class to validate XSendfileResponse instances.

    See also :py:func:`assert_x_sendfile` shortcut function.

    c                 óŠ   — | j                  ||«       |j                  «       D ]  \  }}t        | d|z  «      } ||||«       Œ  y)a]  Assert that ``response`` is a valid X-Sendfile response.

        Optional ``assertions`` dictionary can be used to check additional
        items:

        * ``basename``: the basename of the file in the response.

        * ``content_type``: the value of "Content-Type" header.

        * ``file_path``: the value of "X-Sendfile" header.

        z	assert_%sN)Úassert_x_sendfile_responseÚitemsÚgetattr)ÚselfÚ	test_caseÚresponseÚ
assertionsÚkeyÚvalueÚassert_funcs          úW/var/www/html/acx/venv/lib/python3.12/site-packages/django_downloadview/apache/tests.pyÚ__call__zXSendfileValidator.__call__   sM   € ð 	×'Ñ'¨	°8Ô<Ø$×*Ñ*Ó,ò 	4‰JˆC�Ü! $¨°cÑ(9Ó:ˆKÙ˜	 8¨UÕ3ñ	4ó    c                 óB   — |j                  t        |t        «      «       y ©N)Ú
assertTrueÚ
isinstancer   )r
   r   r   s      r   r   z-XSendfileValidator.assert_x_sendfile_response   s   € Ø×ÑœZ¨Ô2CÓDÕEr   c                 ó<   — |j                  |j                  |«       y r   )ÚassertEqualÚbasename©r
   r   r   r   s       r   Úassert_basenamez"XSendfileValidator.assert_basename    s   € Ø×Ñ˜h×/Ñ/°Õ7r   c                 ó.   — |j                  |d   |«       y )NzContent-Type©r   r   s       r   Úassert_content_typez&XSendfileValidator.assert_content_type#   s   € Ø×Ñ˜h ~Ñ6¸Õ>r   c                 ó.   — |j                  |d   |«       y )Nz
X-Sendfiler   r   s       r   Úassert_file_pathz#XSendfileValidator.assert_file_path&   s   € Ø×Ñ˜h |Ñ4°eÕ<r   c                 óz   — d}|r$|j                  ||   j                  d«      «       y |j                  ||v «       y )NzContent-DispositionÚ
attachment)r   Ú
startswithÚassertFalse)r
   r   r   r   Úheaders        r   Úassert_attachmentz$XSendfileValidator.assert_attachment)   s;   € Ø&ˆÙØ× Ñ  ¨&Ñ!1×!<Ñ!<¸\Ó!JÕKà×!Ñ! &¨HÐ"4Õ5r   N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r!   r'   © r   r   r   r      s&   „ ñò4ò$Fò8ò?ò=ó6r   r   c                 ó*   — t        «       } || |fi |¤ŽS )aL  Make ``test_case`` assert that ``response`` is a XSendfileResponse.

    Optional ``assertions`` dictionary can be used to check additional items:

    * ``basename``: the basename of the file in the response.

    * ``content_type``: the value of "Content-Type" header.

    * ``file_path``: the value of "X-Sendfile" header.

    )r   )r   r   r   Ú	validators       r   Úassert_x_sendfiler/   1   s   € ô #Ó$€IÙ�Y Ñ7¨JÑ7Ð7r   N)Ú#django_downloadview.apache.responser   Úobjectr   r/   r,   r   r   ú<module>r2      s   ðÝ Aô*6˜ô *6óZ8r   