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/samba_tool/__pycache__/forest.cpython-310.pyc
o

�/a��@s0ddlZddlZddlmZGdd�de�ZdS)�N)�SambaToolCmdTestcs@eZdZdZdZ�fdd�Z�fdd�Zdd�Zd	d
�Z�Z	S)�ForestCmdTestCasez&Tests for samba-tool dsacl subcommandsNcsLtt|���|�ddtjddtjdtjdf�|_|j��|_dS)N�-H�	ldap://%s�	DC_SERVER�-U%s%%%s�DC_USERNAME�DC_PASSWORD)�superr�setUp�getSamDB�os�environ�samdb�	domain_dn)�self��	__class__��?/usr/lib/python3/dist-packages/samba/tests/samba_tool/forest.pyrs
�zForestCmdTestCase.setUpcsXtt|���d}t��}t�|jd||jf�|_t�	dtj
d�|d<|j�|�dS)Nz?CN=Directory Service,CN=Windows NT,CN=Services,CN=Configurationz%s,%s�0000000�dsheuristics)r
r�tearDown�ldb�Message�Dnrr�dn�MessageElement�FLAG_MOD_REPLACE�modify)r�ds_dn�mrrrr!s�zForestCmdTestCase.tearDownc
Csb|�ddddtjddtjdtjdf�\}}}|�|||�|�|d	d
�|�d|�dS)
z)Tests that we can display forest settings�forest)�directory_service�showrrrrrr	��Shouldn't be any error messageszdsheuristics: <NO VALUE>N��runsublevelcmdr
r�assertCmdSuccess�assertEqual�assertIn�r�result�out�errrrr�test_display,s
�
�zForestCmdTestCase.test_displaycCsd|�dddddtjddtjdtjd	f�\}}}|�|||�|�|d
d�|�d|�d
S)z0Test that we can modify the dsheuristics settingr")r#r�0000002rrrrrr	r%r&zset dsheuristics: 0000002Nr'r,rrr�test_modify_dsheuristics8s
�
�z*ForestCmdTestCase.test_modify_dsheuristics)
�__name__�
__module__�__qualname__�__doc__rrrr0r2�
__classcell__rrrrrsr)r
r�samba.tests.samba_tool.baserrrrrr�<module>s