403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.37
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/stevedore/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/stevedore/tests/__pycache__/test_cache.cpython-311.pyc
�

��Oc;	��\�dZddlZddlmZddlmZddlmZGd�dej��Z	dS)zTests for stevedore._cache
�N)�mock)�_cache)�utilsc�~�eZdZd�Zd�Zejd��ejd��d�����Zd�ZdS)�	TestCachec���tj�tdd��5t	j��}|�|j��ddd��dS#1swxYwYdS)ziTest caching is disabled if python interpreter is located under /tmp
        directory (Ansible)
        �
executablez	/tmp/fakeN)r�patch�object�sysr�Cache�
assertTrue�_disable_caching)�self�sots  �</usr/lib/python3/dist-packages/stevedore/tests/test_cache.py�test_disable_caching_executablez)TestCache.test_disable_caching_executables����Z�
�
�s�L�+�
>�
>�	2�	2��,�.�.�C��O�O�C�0�1�1�1�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2����	2�	2�	2�	2�	2�	2s�.A"�"A&�)A&c��tj��}tjd��5}d|_tj��}|�d|z��|�|j��d|_tj��}|�	|j��ddd��dS#1swxYwYdS)zSTest caching is disabled if .disable file is present in target
        dir
        zos.path.isfileTz%s/.disableFN)
r�_get_cache_dirrr
�return_valuer
�assert_called_withrr�assertFalse)r�	cache_dir�	mock_pathrs    r�test_disable_caching_filez#TestCache.test_disable_caching_file!s����)�+�+�	�
�Z�(�
)�
)�	3�Y�%)�I�"��,�.�.�C��(�(���)B�C�C�C��O�O�C�0�1�1�1�%*�I�"��,�.�.�C����S�1�2�2�2�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3����	3�	3�	3�	3�	3�	3s�BB6�6B:�=B:zos.makedirsz
builtins.openc��tj��}d|_t|_|�d��|���dS)NT�fake)rr
r�IOError�side_effect�_get_data_for_path�assert_not_called)r�	mock_open�
mock_mkdirrs    r� test__get_data_for_path_no_writez*TestCache.test__get_data_for_path_no_write1sK���l�n�n��#��� '�	�����v�&�&�&��$�$�&�&�&�&�&�c�n�tj��}|�|dt��dS)N�groups)r�_build_cacheable_data�assertIsInstance�dict)r�rets  r�test__build_cacheable_dataz$TestCache.test__build_cacheable_data:s2��
�*�,�,�����c�(�m�T�2�2�2�2�2r%N)	�__name__�
__module__�__qualname__rrrr
r$r,�r%rrrs�������2�2�2�3�3�3� �T�Z�
����T�Z�� � �'�'�!� ���'�3�3�3�3�3r%r)
�__doc__r�unittestr�	stevedorer�stevedore.testsr�TestCaserr0r%r�<module>r6s�����
�
�
�
�������������!�!�!�!�!�!�)3�)3�)3�)3�)3���)3�)3�)3�)3�)3r%

Youez - 2016 - github.com/yon3zu
LinuXploit