o
    h                     @   s   d dl mZ d dlmZ d dlmZmZmZmZm	Z	 e
dejdddd Ze
dejddd	d
 Ze
dejdddd ZdS )    )mock)app_settings)format_hotp_valuegenerate_totp_secret
hotp_valuevalidate_totp_codeyield_hotp_counters_from_timez	time.timeiWp;g)return_valuec                  C   $   dt _tt } t| dksJ d S )Nr      r   TOTP_TOLERANCElistr   lencounters r   [/var/www/html/env_mimamsha/lib/python3.10/site-packages/allauth/mfa/totp/tests/test_unit.pytest_totp_counters_from_time      
r   c                  C   r
   )Nr      r   r   r   r   r   +test_totp_counters_from_time_with_tolerance   r   r   c                  C   s   dt _t } tt| d}t| |sJ tt| d}t| |s"J tt| d}t| |s0J tt| d}t| |r>J tt| d}t| |rLJ d S )Nr   i%pi$pi&pi#pi'p)r   r   r   r   r   r   )test_secretexpected_valuebefore_valueafter_valuetwo_before_valuetwo_after_valuer   r   r   test_validate_with_tolerance   s   r   N)unittestr   allauth.mfar   allauth.mfa.totp.internal.authr   r   r   r   r   patch	MagicMockr   r   r   r   r   r   r   <module>   s    	

