o
    "4g$                     @   s   d d Z dd ZdS )c           	      C   s   | j |ddd}|jdksJ | }t|d d }| j|dd|idd	}|jdks/J | j |ddd}|jdks?J | }t|d d |d
 ksQJ |d d d }|d dksaJ d S )Nz headless:account:current_sessionapplication/json)content_type   datamethodsheadless:account:reauthenticatepasswordr   r      method)getstatus_codejsonlenpost)	auth_clientuseruser_passwordheadless_reverseheadless_clientrespr   method_countlast_method r   }/var/www/html/authentication-server/venv/lib/python3.10/site-packages/allauth/headless/account/tests/test_reauthentication.pytest_reauthenticate   s.   r   c           
      C   sb   ddi|_ tdD ]%}| j|dd|idd}|rdnd	}	|j|	ks$J | d
 |	ks.J q	d S )Nreauthenticatez1/m/ip   r   r   r   r   i  r   status)ACCOUNT_RATE_LIMITSranger   r   r   )
r   r   r   r   r   settingsenable_cacheattemptr   expected_statusr   r   r   test_reauthenticate_rate_limit    s   
	r%   N)r   r%   r   r   r   r   <module>   s    