o
    "4gj                     @   s   d dl Z d dlmZ d dlmZ d dlmZmZ d dlZd dl	m
Z
 d dlmZ e
dd Zed	egZd
d Zejje jd  dk ddZeejjejjdddd ZdS )    N)HttpResponse)AsyncClient)pathreverse)login_not_required)ImmediateHttpResponsec                 C   s   t dd}t|d)Nzraised-response)content)response)r   r   )requestr	    r   n/var/www/html/authentication-server/venv/lib/python3.10/site-packages/allauth/account/tests/test_middleware.pyraise_immediate_http_response   s   

r   raisec                 C   s"   d| _ |d}|jdksJ d S )Nz%allauth.account.tests.test_middlewarez/raises   raised-response)ROOT_URLCONFgetr   )settingsclientrespr   r   r   test_immediate_http_response   s   
r      z*This test is allowed to fail on Django <5.)reasonT)transactionc                    s@   t  }|| I d H  |dI d H }|d tdksJ d S )Nz
/accounts/locationaccount_email)r   aforce_loginr   r   )userdbaclientr   r   r   r    test_accounts_redirect_async_ctx    s
   r   )djangodjango.httpr   django.test.clientr   django.urlsr   r   pytest#allauth.account.internal.decoratorsr   allauth.core.exceptionsr   r   urlpatternsr   markskipifVERSIONskip_django_lt_5asyncio	django_dbr   r   r   r   r   <module>   s$    
