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/dcerpc/__pycache__/rpc_talloc.cpython-310.pyc
o

�/aC�@s^dZddlZej�dd�ddlZddlZddlmZddlZe�	�Gdd�dej
j�ZdS)zGTests for the talloc handling in the generated Python DCE/RPC bindings.�Nz
bin/python)�drsuapic@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�TallocTestsz3test talloc behaviour of pidl generated python codecCs,t�|�}|dur||j8}|�||�dS)z4check that the number of allocated blocks is correctN)�talloc�total_blocks�initial_blocks�assertEqual)�self�object�num_expected�nblocks�r�?/usr/lib/python3/dist-packages/samba/tests/dcerpc/rpc_talloc.py�check_blocks+s

zTallocTests.check_blockscCsBt��}|�|d�gd�}d|_||_t|�|_|�|d�|S)z-get a list of attributes for RODC replication�)r��r)r�DsPartialAttributeSetr�version�attids�len�
num_attids)r�partial_attribute_setrrrr
�get_rodc_partial_attribute_set2s
z*TallocTests.get_rodc_partial_attribute_setcCsb|��}|�|d�t��}|�|d�|�dd�||_|jjddkr)td��|�dd�dS)Nrr�zWrong value in attids[2]�)rrr�DsGetNCChangesRequest8rr�	Exception)r�pas�req8rrr
�pas_testDszTallocTests.pas_testcCs0t�d�|_|�dd�|��|�dd�dS)Nr)rrrrr)rrrr
�test_runRszTallocTests.test_runN)�__name__�
__module__�__qualname__�__doc__rrrr rrrr
r(sr)
r$�sys�path�insert�samba�samba.tests�samba.dcerpcrr�enable_null_tracking�tests�TestCaserrrrr
�<module>s