HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/samba/tests/__pycache__/auth.cpython-310.pyc
o

�/a�@sDdZddlmZddlZGdd�dejj�ZGdd�dejj�ZdS)z�Tests for the Auth Python bindings.

Note that this just tests the bindings work. It does not intend to test
the functionality, that's already done in other tests.
�)�authNc�DeZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Z�Z	S)
�AuthSystemSessionTestscs(tt|���t��|_tj��|_dS�N)	�superr�setUpr�system_session�samba�tests�env_loadparm�lp��self��	__class__��2/usr/lib/python3/dist-packages/samba/tests/auth.pyrs
zAuthSystemSessionTests.setUpcC�^|�t|jd��|�t|jd��|�t|jd��|�t|jd��|�t|jd��dS�N�credentials�info�security_token�session_key�torture)�
assertTrue�hasattrrr
rrr�test_system_session_attrs#�
z0AuthSystemSessionTests.test_system_session_attrscCsL|�|jj���|�|jj���|�|jj��|j�	d��
�d�dS)Nznetbios name�$)�assertIsNonerr�get_bind_dn�assertIsNotNone�get_password�assertEqual�get_usernamer�get�upperr
rrr�test_system_session_credentials*s
�z6AuthSystemSessionTests.test_system_session_credentialscCs:|�|jjjd�|�|jjjd�|�|jjjd�dS)N�SystemzNT AUTHORITY�SYSTEM)r#rr�	full_name�domain_name�account_namer
rrr�test_system_session_info0�z/AuthSystemSessionTests.test_system_session_infocCsd}|�|jj|�dS)Ns)r#rr)r�expectedrrr�test_system_session_session_key5sz6AuthSystemSessionTests.test_system_session_session_keycCs(|�|jj���|�|jj���dSr)rrr�	is_system�assertFalse�is_anonymousr
rrr�"test_system_session_security_token9sz9AuthSystemSessionTests.test_system_session_security_token)
�__name__�
__module__�__qualname__rrr'r-r0r4�
__classcell__rrrrrsrcr)
�AuthAdminSessionTestscs.tt|���tj��|_t�|jd�|_dS)Nz)S-1-5-21-2212615479-2695158682-2101375467)	rr9rr	r
rrr�
admin_sessionr
rrrr@s

�zAuthAdminSessionTests.setUpcCrr)rrr:r
rrr�test_admin_session_attrsFrz.AuthAdminSessionTests.test_admin_session_attrscCs|�|jj�dSr)rr:rr
rrr�test_admin_session_credentialsMsz4AuthAdminSessionTests.test_admin_session_credentialscCsB|�|jjjd�|�|jjj|j�d��|�|jjjd�dS)N�
Administrator�	workgroup)r#r:rr*r+rr%r,r
rrr�test_session_info_detailsPs�
��z/AuthAdminSessionTests.test_session_info_detailscCs:|�|jj���|�|jj���|�|jj���dSr)r2r:rr1r3r�has_builtin_administratorsr
rrr�test_security_tokenXr.z)AuthAdminSessionTests.test_security_tokencCshtjj|j|jdd�|�|jjjd�|�|jjj|j�	d��
�|j�	d�d�|�|jj�dS)Nr=)�session_info�lp_ctx�	user_namer>zwinbind separator)
r	r�session_info_fill_unixr:rr#�	unix_info�sanitized_username�	unix_namer%r&r!�
unix_tokenr
rrr�test_session_info_unix_details]s
��
���z4AuthAdminSessionTests.test_session_info_unix_details)
r5r6r7rr;r<r?rArJr8rrrrr9>sr9)�__doc__r	r�samba.testsr
�TestCaserr9rrrr�<module>s
"