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__/glue.cpython-310.pyc
o

�/a�@s<dZddlmZddlmZddlZGdd�dejj�ZdS)z$Tests for the _glue Python bindings.�)�_glue)�paramNcsteZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Z�ZS)�	GlueTestscstt|���dS�N)�superr�setUp��self��	__class__��2/usr/lib/python3/dist-packages/samba/tests/glue.pyrszGlueTests.setUpcCs.t�d�}|�t|�t�|�t|�d�dS)N�
)r�generate_random_str�assertEqual�type�str�len�r	�stringrrr
�test_generate_random_strs
z"GlueTests.test_generate_random_strcCsHt�dd�}|�t|�t�|�dt|�kodk�dS�dS)N�r)r�generate_random_passwordrrr�
assertTruer)r	�passwordrrr
�test_generate_random_password#s,z'GlueTests.test_generate_random_passwordcC�|�t�d�d�dS)N����+{G�)rr�unix2nttimerrrr
�test_unix2nttime(�zGlueTests.test_unix2nttimecCr)Nrr)rr�nttime2unixrrrr
�test_nttime2unix+r!zGlueTests.test_nttime2unixcCsL|�t�d�d�|�t�d�d�|�t�d�d�|�t�d�d�dS)N��?r����A�V�Pv9������A��,Qv9�)rr�float2nttimerrrr
�test_float2nttime.szGlueTests.test_float2nttimecCs�|�t�d�d�|�t�d�d�|�t�d�d�|�t�d�d�|�t�d�d�|�t�d	�d
�|�t�d�d�|�t�d
�d�|�t�d�d�dS)Nrg����l����gH���0�jBllrr$r&r%r(r'rl����)rr�nttime2floatrrrr
�test_nttime2float5szGlueTests.test_nttime2floatcCs*t�d�}|�t|�t�|�d|�dS)Nr�1970)r�
nttime2stringrrr�assertInrrrr
�test_nttime2stringAs
zGlueTests.test_nttime2stringc	Csft��}z(|�t�d��|�t��d�|�t�d��|�t��d�Wt�|�dSt�|�w)Nrr)r�get_debug_level�assertIsNone�set_debug_levelr)r	�
prev_levelrrr
�test_debug_levelFszGlueTests.test_debug_levelcCs&t��}t�|�}|�t|�t�dSr)r�LoadParmr�
interface_ipsrr�list)r	�lp�ipsrrr
�test_interface_ipsPs
zGlueTests.test_interface_ipscCs,|�t�dd�d�|�t�dd�d�dS)N�aA�Aar�ab)rr�strcasecmp_m�assertNotEqualrrrr
�test_strcasecmpUszGlueTests.test_strcasecmpcCsDd}|�t�|d�d�|�t�|d�d�|�t�|d�d�dS)N�testing_string_num__one�_�_string_num__one�__�__one�ring�
ring_num__one)rr�strstr_mrrrr
�
test_strstr_mYszGlueTests.test_strstr_m)�__name__�
__module__�__qualname__rrrr r#r*r,r0r5r;rArJ�
__classcell__rrr
r
rs
r)�__doc__�sambarr�samba.tests�tests�TestCaserrrrr
�<module>s