
    )Jf                     
   d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dl
mZ d dlmZ d dlmZmZ  ej        d	d
d           gZ edej        j        ej        j        dddddd	  	         G d de                      ZdS )    )get_user_model)
validators)Client)override_settings)reverse)app_settings)user_logged_out)MockTestCasez^[a-c]+$znot abc)regexmessageflagshttpsNz/accounts/profile/z/accounts/welcome/z-allauth.account.adapter.DefaultAccountAdapterT)	ACCOUNT_DEFAULT_HTTP_PROTOCOLACCOUNT_EMAIL_VERIFICATIONACCOUNT_AUTHENTICATION_METHODACCOUNT_SIGNUP_FORM_CLASSACCOUNT_EMAIL_SUBJECT_PREFIXLOGIN_REDIRECT_URLACCOUNT_SIGNUP_REDIRECT_URLACCOUNT_ADAPTERACCOUNT_USERNAME_REQUIREDc                   h    e Zd Z ed          d             Z ed          d             Zd ZdS )LogoutTestsT)ACCOUNT_LOGOUT_ON_GETc                 b    |                      d          \  }}|                     |d           d S )Ngetaccount/messages/logged_out.txt)_logout_viewassertTemplateUsed)selfcresps      d/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/allauth/account/tests/test_logout.pytest_logout_view_on_getz#LogoutTests.test_logout_view_on_get   s6    ##E**4&GHHHHH    Fc                     |                      d          \  }}|                     |dt          j        z             t	                      }t          j        |           |                    t          d                    }|                     |d           |	                    t                      |j        t                      j                            d          t
                     t          j        |           d S )Nr   zaccount/logout.%saccount_logoutr   john)username)senderrequestusersignal)r   r    r   TEMPLATE_EXTENSIONr
   r	   connectpostr   assert_called_once_withr   wsgi_requestobjectsr   
disconnect)r!   r"   r#   receiver_mocks       r$   test_logout_view_on_postz$LogoutTests.test_logout_view_on_post"   s    ##E**4%(GG	
 	
 	
 ...vvg.//00&GHHH--!##%!!)--v->>"	 	. 	
 	
 	
 	"=11111r&   c                 Z   t                      }t                      j                            dd          }|                    d           |                                 t                      }|                    dd           | t          ||          t          d                    fS )Nr)   T)r*   	is_activedoe)r*   passwordr(   )	r   r   r4   createset_passwordsavelogingetattrr   )r!   methodr"   r-   s       r$   r   zLogoutTests._logout_view8   s    HH'..$.OO%   		HH	%000$'!V$$W-=%>%>????r&   N)__name__
__module____qualname__r   r%   r7   r    r&   r$   r   r      s         T222I I 32I U3332 2 432*@ @ @ @ @r&   r   )django.contrib.authr   django.corer   django.test.clientr   django.test.utilsr   django.urlsr   allauth.accountr   allauth.account.signalsr	   allauth.testsr
   r   RegexValidatortest_username_validatorsEmailVerificationMethod	MANDATORYAuthenticationMethodUSERNAMEr   rE   r&   r$   <module>rT      sB   . . . . . . " " " " " " % % % % % % / / / / / /       ( ( ( ( ( ( 3 3 3 3 3 3 ( ( ( ( ( ( ( ( JK!LLL 
 ")+CM"."C"L"!%+ 4C"
 
 
#@ #@ #@ #@ #@( #@ #@
 
#@ #@ #@r&   