HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3.6/site-packages/tracer/tests/__pycache__/test_processes.cpython-36.opt-1.pyc
3

"e�	�@sjddlTddlmZmZmZddlmZddlmZddl	Z	ddl
Z
Gdd�dej�Z
Gd	d
�d
e�ZdS)�)�*�)�	Processes�Process�ProcessWrapper)�SystemdDbus)�ProcessesCollectionNc@sdeZdZejdd�dd��Zejdd�dd��Zejdd�dd��Zd	d
�Zejdd�dd��Z	d
S)�
TestProcessesTz%@TODO Create Mock for Processes classcCs>tj�d}|j�}|j|t�x|D]}|j|t�q&WdS)Nr)r�all�childrenZassertIsInstancerr)�self�processr�child�r�$/usr/lib/python3.6/test_processes.py�
test_childrens

zTestProcesses.test_childrencCs|ttj��}ttj��}|j|ttj���|j||j��|j||j��tj�ttj��}|j	||�|j
||�dS)N)r�os�getpid�getppidZassertIs�parentZassertInrZreset_cache�assertEqualZassertIsNot)rr
rZprocess2rrr�test_unique_processsz!TestProcesses.test_unique_processcCsdttj��}|j�tjtjjtjd�}|j	dt
|j���|j�|j	dt
|j���|j�dS)N)�stdinrr)
rrrr�
subprocess�Popen�sys�
executable�PIPEr�lenZ
rebuild_cacheZ	terminate)rr
rrrr�test_process_caching"sz"TestProcesses.test_process_cachingcCsVt�}ddddddgd�|_t�}ddddd	d
ddgd�|_t�}ddd
gd�|_dS)NZsshdz/usr/sbin/sshdz-DZfooZbar)�nameZexeZcmdlineZsome�thing�andZ	argumentsZidkZwhatZ
withoutparams)�ProcessMock�data)rZp1Zp2Zp3rrr�test_name_sshd1szTestProcesses.test_name_sshdcCst�}tj�}t|�d}dS)Ni�)rr�pids�max)rZdbusr&Znonexistingrrr�	test_dbusDszTestProcesses.test_dbusN)
�__name__�
__module__�__qualname__�unittestZskipIfrrrr%r(rrrrr		s
	r	c@seZdZdd�Zdd�ZdS)r#cCs
i|_dS)N)r$)rrrr�__init__NszProcessMock.__init__cCs
|j|S)N)r$)rr rrr�_attrQszProcessMock._attrN)r)r*r+r-r.rrrrr#Msr#)Z__meta__Ztracer.resources.processesrrrZtracer.resources.SystemdDbusrZtracer.resources.collectionsrrrr,ZTestCaser	r#rrrr�<module>sD