
    bl	                     `    d Z ddlZddlZddlmZmZ d Z G d dej        j                  Z	dS )zTests for samba.kcc.graph    N)total_scheduleconvert_schedule_to_repltimesc                    | d S ddl m} |                                }d|_        d|_        d|_        |                                }d|_        d|_        |g|_	        |
                                }| |_        |g|_        |S )Nr   )drsblobs         )samba.dcerpcr   schedulesize	bandwidthnumberOfSchedulesscheduleHeadertypeoffsetheaderArrayscheduleSlotsslots	dataArray)timesr   r   headerdatas        7/usr/lib/python3/dist-packages/samba/tests/kcc/graph.pyntdsconn_scheduler      s    }t%%%%%%  ""HHMH!"H$$&&FFKFM"8H!!##DDJHO    c                       e Zd Zd Zd ZdS )GraphFunctionTestsc           
      "   dgdz  }dgdz  dfdgdz  dfdgdz  dfdd	gd
z  dft          t          d                    dz  dft          t          d                    dz  dffD ](\  }}|                     t          |          |           )d S )N   T         i     iP     3   *            l         )listrangeassertEqualr   )selfr   totals      r   test_total_schedulez&GraphFunctionTests.test_total_schedule.   s    6B;"c""f%"f%"F+eAhh"$f-eAhh"$f- / 	> 	>OHe ^H55u====	> 	>r   c           	         dgdz  dgdz  fd dgdz  fdgdz  dgdz  fddgdz  d	gdz  ft          t          d
                    dz  g ddz  ffD ]7\  }}t          |          }|                     t	          |          |           8d S )Nr   r!      r       f   r$   
   :   r(      )r   #   E   `      4   V   r)   )r-   r.   r   r/   r   )r0   ntdsconn_times	repltimesr   s       r   "test_convert_schedule_to_repltimesz5GraphFunctionTests.test_convert_schedule_to_repltimes9   s    #v{+v{##v{+r!D6B;/eAhh"$;;;b@B*C 		) 		)%NI )88H:8DD') ) ) )		) 		)r   N)__name__
__module____qualname__r2   rB    r   r   r   r   ,   s2        	> 	> 	>
) 
) 
) 
) 
)r   r   )
__doc__sambasamba.testssamba.kcc.graphr   r   r   testsTestCaser   rF   r   r   <module>rM      s   (         I I I I I I I I  $) ) ) ) )- ) ) ) ) )r   