
    )Jf                     x    d dl Z d dlmZ d dlmZ d dlmZ d dlmZm	Z	 ddl
mZ ddlmZ  G d	 d
ee	          ZdS )    N)RequestFactory)override_settings)OAuth2TestsMixin)MockedResponseTestCase   )AuthentiqProvider)AuthentiqOAuth2Adapterc                   :   e Zd Zej        Zd Z ed          d             Z ed          d             Z	d Z
d Z eddd	          d
             Z eddd	          d             Z eddd	          d             Z eddd	          d             ZdS )AuthentiqTestsc                 R    t          dt          j        dddddd                    S )N   
ZLARGMFT1Mzjane@email.invalidTJaneDoe)subemailemail_verified
given_namefamily_name)r   jsondumps)selfs    r/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/allauth/socialaccount/providers/authentiq/tests.pyget_mocked_responsez"AuthentiqTests.get_mocked_response   s?    J'1&*"(#(  
 
 	
    F)SOCIALACCOUNT_QUERY_EMAILc                     | j                                         }|                     d|           |                     d|           d S Naq:namer   )providerget_default_scopeassertInassertNotInr   scopess     r   test_default_scopes_no_emailz+AuthentiqTests.test_default_scopes_no_email   sG     0022i(((&)))))r   Tc                     | j                                         }|                     d|           |                     d|           d S r   )r!   r"   r#   r%   s     r   test_default_scopes_emailz(AuthentiqTests.test_default_scopes_email&   sE     0022i(((gv&&&&&r   c                     t                                          t          j                  }| j                            |          }|                     d|           |                     d|           d S )Nopenidr    r   getr
   authorize_urlr!   	get_scoper#   r   requestr&   s      r   test_scopeszAuthentiqTests.test_scopes.   sb     ""&&'='KLL((11h'''i(((((r   c                 2   t                                          t          j        t	          d                    }| j                            |          }|                     d|           |                     d|           |                     d|           d S )Nfoo)scoper+   r    )r   r-   r
   r.   dictr!   r/   r#   r0   s      r   test_dynamic_scopesz"AuthentiqTests.test_dynamic_scopes4   s     ""&&"0$U2C2C2C
 
 ((11h'''i(((eV$$$$$r   )r   SOCIALACCOUNT_EMAIL_REQUIRED SOCIALACCOUNT_EMAIL_VERIFICATIONc                     t                                          t          j                  }| j                            |          }|                     d|           |                     d|           d S )Nzemail~rsr   r   r-   r
   r.   r!   r/   r#   r$   r0   s      r   #test_scopes_required_verified_emailz2AuthentiqTests.test_scopes_required_verified_email=   sf     !""&&'='KLL((11j&)))&)))))r   c                     t                                          t          j                  }| j                            |          }|                     d|           |                     d|           d S )Nzemail~sr   r;   r0   s      r   #test_scopes_optional_verified_emailz2AuthentiqTests.test_scopes_optional_verified_emailH   f     !""&&'='KLL((11i(((&)))))r   c                     t                                          t          j                  }| j                            |          }|                     d|           |                     d|           d S )Nzemail~rr   r;   r0   s      r   test_scopes_required_emailz)AuthentiqTests.test_scopes_required_emailS   r?   r   c                     t                                          t          j                  }| j                            |          }|                     d|           d S )Nr   r,   r0   s      r   test_scopes_optional_emailz)AuthentiqTests.test_scopes_optional_email^   sP     !""&&'='KLL((11gv&&&&&r   N)__name__
__module____qualname__r	   idprovider_idr   r   r'   r)   r2   r7   r<   r>   rA   rC    r   r   r   r      s       #&K
 
 
 "'  * * *
 "&  ' ' '
) ) )% % % "&%))-  
* * 
* "&%*)-  
* * 
* "&%)).  
* * 
* "&%*).  
' ' 
' ' 'r   r   )r   django.test.clientr   django.test.utilsr   allauth.socialaccount.testsr   allauth.testsr   r   r!   r	   viewsr
   r   rI   r   r   <module>rO      s     - - - - - - / / / / / / 8 8 8 8 8 8 2 2 2 2 2 2 2 2 ' ' ' ' ' ' ) ) ) ) ) )Y' Y' Y' Y' Y'%x Y' Y' Y' Y' Y'r   