__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

�w�g…��z�SrSSKJr SSKrSSKrSSKrSSKrSSKrSSKrSSK	J
r
 SSKrSSKJ
r
 SSKJrJr SSKJr SSKrSSKJr SS	KJr SS
KJrJrJrJrJrJrJr SSKJr Sr"S
S\R@5r!"SS\R@5r""SS\R@5r#"SS\R@5r$"SS\R@5r%"SS\R@5r&"SS\R@5r'"SS\'5r("SS\'5r)"SS \R@5r*"S!S"\R@5r+g)#zTests for the Launchpad class.�)�contextmanagerN)�patch)�ServiceRoot)�AccessToken�Credentials)�uris)�	Launchpad)�UnencryptedFileCredentialStore)�assert_keyring_not_imported�BadSaveKeyring�fake_keyring�FauxSocketModule�InMemoryKeyring�NoNetworkAuthorizationEngine�NoNetworkLaunchpad)�KeyringCredentialStore�http://api.example.com/c��\rSrSrSrSrSrg)�TestResourceTypeClasses�9z<launchpadlib must know about restfulclient's resource types.c��[RR5H(upUR[RUU5 M* g�N)r�RESOURCE_TYPE_CLASSES�items�assertEqualr	)�self�name�clss   �C/usr/lib/python3/dist-packages/launchpadlib/tests/test_launchpad.py�test_resource_types�+TestResourceTypeClasses.test_resource_types<s;��%�:�:�@�@�B�I�D����Y�<�<�T�B�C�H�C��N)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r �__static_attributes__r#r"rrr9s��F�Ir"rc�d�\rSrSrSrSr\S5rSrSr	Sr
SrS	rS
r
SrSrS
rSrg)�TestNameLookups�Cz0Test the utility functions in the 'uris' module.c�(�[/SQ5Ulg)N)�
production�	qastaging�staging�dogfood�dev�test_dev�edge)�sorted�aliases�rs r�setUp�TestNameLookups.setUpFs���
�

��r"c#�b# �[R"SS9n[R"S5 Sv� UR[	U5S5 UunUR[
UR[55 URS[U55 SSS5 g!,(df   g=f7f)NT��record�always�zno longer exists)�warnings�catch_warnings�simplefilterr�len�
assertTrue�
issubclass�category�DeprecationWarning�assertIn�str)r�caught�warnings   r�edge_deprecation_error�&TestNameLookups.edge_deprecation_errorSs{����
$�
$�D�
1�V��!�!�(�+�����S��[�!�,��J�W��O�O�J�w�'7�'7�9K�L�M��M�M�,�c�'�l�;�2�
1�
1�s�B/�A>B�	B/�
B,�(B/c��UR[[RR	55UR
5 UR[[RR	55UR
5 gr)rr5r�
service_roots�keysr6�	web_rootsr7s r�test_short_names� TestNameLookups.test_short_names`sP������� 2� 2� 7� 7� 9�:�D�L�L�I�������� 3� 3� 5�6����Er"c���UR5 UR[R"S5[R"S55 SSS5 g!,(df   g=f�Nr4r.�rKrr�lookup_service_rootr7s r�$test_edge_service_root_is_production�4TestNameLookups.test_edge_service_root_is_productionesF���
(�
(�
*�����(�(��0��(�(��6�
�+�
*�
*���;A�
A#c���UR5 UR[R"S5[R"S55 SSS5 g!,(df   g=frT�rKrr�lookup_web_rootr7s r� test_edge_web_root_is_production�0TestNameLookups.test_edge_web_root_is_productionnsF���
(�
(�
*�����$�$�V�,��$�$�\�2�
�+�
*�
*�rYc���UR5 UR[R"[R5[R"S55 SSS5 g!,(df   g=f�Nr.�rKrrrV�EDGE_SERVICE_ROOTr7s r�-test_edge_service_root_url_becomes_production�=TestNameLookups.test_edge_service_root_url_becomes_productionw�J��
�
(�
(�
*�����(�(��)?�)?�@��(�(��6�
�+�
*�
*���A	A#�#
A1c���UR5 UR[R"[R5[R"S55 SSS5 g!,(df   g=fr`)rKrrr\�
EDGE_WEB_ROOTr7s r�)test_edge_web_root_url_becomes_production�9TestNameLookups.test_edge_web_root_url_becomes_production~sJ��
�
(�
(�
*�����$�$�T�%7�%7�8��$�$�\�2�
�+�
*�
*�rfc���UR5 UR[R"[R5[R"S55 SSS5 g!,(df   g=fr`rar7s r�/test_top_level_edge_constant_becomes_production�?TestNameLookups.test_top_level_edge_constant_becomes_production�rerfc���UR5 UR[R"S5[R"S55 SSS5 g!,(df   g=f)Nzhttps://api.edge.launchpad.net/r.rUr7s r�5test_edge_server_equivalent_string_becomes_production�ETestNameLookups.test_edge_server_equivalent_string_becomes_production�sE��
�
(�
(�
*�����(�(�)J�K��(�(��6�
�+�
*�
*�rYc���UR5 UR[R"S5[R"S55 SSS5 g!,(df   g=f)Nzhttps://edge.launchpad.net/r.r[r7s r�9test_edge_web_server_equivalent_string_becomes_production�ITestNameLookups.test_edge_web_server_equivalent_string_becomes_production�sE��
�
(�
(�
*�����$�$�%B�C��$�$�\�2�
�+�
*�
*�rYc�
�UR5 URH:nUR[R"U5[R
U5 M< SSS5 UR5 URH:nUR[R"U5[RU5 M< SSS5 SnUR[R"U5U5 UR[R"U5U5 SnUR[[RU5 UR[[RU5 g!,(df   GN
=f!,(df   N�=f)z=Ensure that short service names turn into long service names.Nzhttp://some-other-server.comz	not-a-url)
rKr6rrrVrNr\rP�assertRaises�
ValueError)r�alias�
other_root�	not_a_urls    r�test_lookups�TestNameLookups.test_lookups�s��
�
(�
(�
*������ � ��,�,�U�3�T�5G�5G��5N��&�+��
(�
(�
*������ � ��(�(��/�����1F��&�+�4�
�����1�1�*�=�z�J�����-�-�j�9�:�F� �	����*�d�&>�&>�	�J����*�d�&:�&:�I�F�++�
*��+�
*�s�AE"�4AE4�"
E1�4
F)r6N)r$r%r&r'r(r8rrKrQrWr]rcrirlrorrrzr)r#r"rr+r+CsM��:�
��
<��
<�F�
�������Gr"r+c��\rSrSrSrSrSrg)�"TestServiceNameWithEmbeddedVersion�aReject service roots that include the version at the end of the URL.

If the service root is "http://api.launchpad.net/beta/" and the
version is "beta", the launchpadlib constructor will raise an
exception.

This happens with scripts that were written against old versions
of launchpadlib. The alternative is to try to silently fix it (the
fix will eventually break as new versions of the web service are
released) or to go ahead and make a request to
http://api.launchpad.net/beta/beta/, and cause an unhelpful 404
error.
c
��Sn[RSU-n[SSSX!S9 [S5e![a3nUR[
U5RS55 SnAOSnAff=fUS-
nUR[[SSSUUS9 [Rn[RSU-S-nUR[[SSSUS9 g)Nzversion-foor0)�service_root�versionz*Expected a ValueError that was not thrown!zoIt looks like you're using a service root that incorporates the name of the web service version ("version-foo")�/�r�)rrNr	�AssertionErrorrvrCrH�
startswithrur�DEFAULT_VERSION)rr��root�e�default_versions     r�'test_service_name_with_embedded_version�JTestServiceNameWithEmbeddedVersion.test_service_name_with_embedded_version�s��� ���!�!�)�,�w�6��	O��d�D�$�T�K�!�!M�N�N���	��O�O��A��!�!�&��
�
��	��	
��������������	�	
�-�<�<���!�!�)�,��>��D������	�4��t�$�	�	
s�1�
A.�)A)�)A.r#N)r$r%r&r'r(r�r)r#r"rr}r}�s���&
r"r}c�0�\rSrSrSrSrSrSrSrSr	g)	�#TestRequestTokenAuthorizationEngine��z4Tests for the RequestTokenAuthorizationEngine class.c�B�UR[[[5 gr�rurvr�SERVICE_ROOTr7s r�test_app_must_be_identified�?TestRequestTokenAuthorizationEngine.test_app_must_be_identified�s������4�l�	
r"c� �[[SS9 g�Nr��application_name�rr�r7s r�$test_application_name_identifies_app�HTestRequestTokenAuthorizationEngine.test_application_name_identifies_app�s��$�\�F�Kr"c� �[[SS9 g�Nr��
consumer_namer�r7s r�!test_consumer_name_identifies_app�ETestRequestTokenAuthorizationEngine.test_consumer_name_identifies_app�s��$�\��Hr"c��UR[[[SSS9 UR[[[SSS9 g)N�name1�name2)r�r�rr�r7s r�#test_conflicting_app_identification�GTestRequestTokenAuthorizationEngine.test_conflicting_app_identification�sH������(��$�!�	�	
�	
����(��#� �	�	
r"r#N)
r$r%r&r'r(r�r�r�r�r)r#r"rr�r��s��>�
�
L�I�
r"r�c�$�\rSrSrSrSrSrSrg)�%TestLaunchpadLoginWithCredentialsFileiz9Tests for Launchpad.login_with() with a credentials file.c�<�[R"5up[R"SUS9n[R
"U5nUR
URRURRR5 [R"U5 g)N�
not important)r��credentials_file)�tempfile�mkstempr�
login_withr�load_from_pathr�consumer�key�credentials�os�remove)r�ignore�filename�	launchpadr�s     r�
test_filename�3TestLaunchpadLoginWithCredentialsFile.test_filenamesy��#�+�+�-���&�1�1�,�x�
�	�"�0�0��:������ � �$�$�i�&;�&;�&D�&D�&H�&H�	
�	�	�	�(�r"c��[R"5up[5nUR[[
RSUUS9 [R"U5 g)Nr�)r�r��credential_store)	r�r�rrurvrr�r�r�)rr�r��stores    r�+test_cannot_specify_both_filename_and_store�QTestLaunchpadLoginWithCredentialsFile.test_cannot_specify_both_filename_and_store#sQ��#�+�+�-���&�(�������)�)�,�%�"�	�	
�	�	�	�(�r"r#N)r$r%r&r'r(r�r�r)r#r"rr�r�s��C��
r"r�c��\rSrSrSrSrg)�4TestLaunchpadLoginWithCredentialsFileFromEnvVariablei0c���[R"5upU[RS'[R
"SS9nUR
UR[5 URURRU5 [R"S5 [RS	UR[RRS55 [R"U5 g)N�LP_CREDENTIALS_FILEr�r�)r�r�r��environrr��assertIsInstancer�r
rr��unsetenv�assertIsNone�getr�)rr�r�r�s    rr��BTestLaunchpadLoginWithCredentialsFileFromEnvVariable.test_filename4s���#�+�+�-���,4��
�
�(�)�&�1�1�,�
�	�	
����&�&�(F�	
�	
����3�3�<�<�h�G�
���)�*��J�J�,�-����"�*�*�.�.�)>�?�@�
�	�	�(�r"r#N)r$r%r&r'r�r)r#r"rr�r�0s��r"r�c�$�\rSrSrSrSrSrSrg)�KeyringTestiIz*Base class for tests that use the keyring.c�R�[5 [5[Rlgr)rr�launchpadlibr��keyringr7s rr8�KeyringTest.setUpLs��#�%�,;�+<�� � �(r"c�$�[R?gr)r�r�r�r7s r�tearDown�KeyringTest.tearDownSs���$�$�,r"r#N)r$r%r&r'r(r8r�r)r#r"rr�r�Is��4�=�-r"r�c�^�\rSrSrSrU4SjrU4SjrSrSrSr	Sr
S	rS
rSr
SrS
rSrSrSrSrSrSrSrSrSrSrSrSrSrU=r$)�TestLaunchpadLoginWithiXz!Tests for Launchpad.login_with().c�V>�[TU]5 [R"5Ulgr)�superr8r��mkdtemp�temp_dir�r�	__class__s �rr8�TestLaunchpadLoginWith.setUp[s���
��
�� �(�(�*��
r"c�b>�[TU]5 [R"UR5 gr)r�r��shutil�rmtreer�r�s �rr��TestLaunchpadLoginWith.tearDown_s���
�����
�
�d�m�m�$r"c��[RRURS5n[R
"S[US9 UR[RRU55 [RRUS5nUR[RRU55 UR[RR[RRUS555 [RRUS5nUR[RRU55 g)Nr�r��r��launchpadlib_dir�api.example.com�cacher�)
r��path�joinr�rr�r�rC�isdir�assertFalse)rr��service_path�credentials_paths    r�test_dirs_created�(TestLaunchpadLoginWith.test_dirs_createdcs����7�7�<�<��
�
�~�F���%�%��%�-�	
�	
������
�
�&6�7�8��w�w�|�|�$4�6G�H��������
�
�l�3�4�	
������
�
�b�g�g�l�l�<��&I�J�K��7�7�<�<��m�D����������'7�8�9r"c�"�[RRURS5n[R"U5 [R
"US5 UR
[RRU55 [R"U5n[R"UR5nURU[R[R-[R-5 [R "S["US9 [R"U5n[R"UR5nUR%U[R[R-[R-5 g)Nr�i�r�r�)r�r�r�r��mkdir�chmodrCr��stat�S_IMODE�st_mode�assertNotEqual�S_IWRITE�S_IREAD�S_IEXECrr�r�r�rr��statinfo�modes    r�'test_dirs_created_are_changed_to_secure�>TestLaunchpadLoginWith.test_dirs_created_are_changed_to_securezs����7�7�<�<��
�
�~�F��
���!�"�
���!�5�)�������
�
�&6�7�8��7�7�+�,���|�|�H�,�,�-�����D�$�-�-�$�,�,�">����"M�N��%�%��%�-�	
��7�7�+�,���|�|�H�,�,�-������t�}�}�t�|�|�;�d�l�l�J�Kr"c���[RRURS5n[R
"S[US9 UR[RRU55 [R"U5n[R"UR5nURU[R[R-[R-5 g)Nr�r�r�)r�r�r�r�rr�r�rCr�r�r�r�rr�r�r�r�s    r�test_dirs_created_are_secure�3TestLaunchpadLoginWith.test_dirs_created_are_secure�s����7�7�<�<��
�
�~�F���%�%��%�-�	
�
	
������
�
�&6�7�8��7�7�+�,���|�|�H�,�,�-������t�}�}�t�|�|�;�d�l�l�J�Kr"c�@�[RRURS5n[R
"S[USS9nURURSS5 [R
"S[USS9nURURSS5 g)Nr�r��foo)r�r�r�r��bar)	r�r�r�r�rr�r�r�passed_in_args�rr�r�s   r�test_version_is_propagated�1TestLaunchpadLoginWith.test_version_is_propagated�s����7�7�<�<��
�
�~�F��&�1�1��%�-��	
�	�	
����1�1�)�<�e�D�'�1�1��%�-��	
�	�	
����1�1�)�<�e�Dr"c��[RRURS5n[R
"S[US9nURURRRS5 [R
"S[US9nURURRRS5 g)Nr�zvery importantr�)r�r�r�r�rr�r�rr�r�r�rs   r�#test_application_name_is_propagated�:TestLaunchpadLoginWith.test_application_name_is_propagated�s���
�7�7�<�<��
�
�~�F��&�1�1��%�-�
�	�
	
����!�!�*�*�;�;�=M�	
�'�1�1��%�-�
�	�
	
����!�!�*�*�;�;�=M�	
r"c��[[S5n[R"US9 UR	UR
S5 UR	URS5 g)N�application name��authorization_enginer>)rr�rr�r�request_tokens_obtained�access_tokens_obtained�r�engines  r�'test_authorization_engine_is_propagated�>TestLaunchpadLoginWith.test_authorization_engine_is_propagated�sK��.�l�<N�O���%�%�6�B�����7�7��;�����6�6��:r"c�L�UR[[R5 gr)rurvrr�r7s r�)test_login_with_must_identify_application�@TestLaunchpadLoginWith.test_login_with_must_identify_application�s��	
���*�&8�&C�&C�Dr"c�,�[R"SS9 gr��rr�r7s rr��;TestLaunchpadLoginWith.test_application_name_identifies_app�s��	�%�%�v�>r"c�,�[R"SS9 gr�rr7s rr��8TestLaunchpadLoginWith.test_consumer_name_identifies_app�s��	�%�%�F�;r"c�l�[[S5nUR[[R
SUS9 g)�;Catch an attempt to specify inconsistent application_names.zapplication name1zapplication name2r	N�rr�rurvrr�r
s  r�+test_inconsistent_application_name_rejected�BTestLaunchpadLoginWith.test_inconsistent_application_name_rejected�s9��-��-�
��	
�����)�)��!'�		�	
r"c�j�[[SSS9nUR[[R
SUS9 g)rN�consumer_name1r��consumer_name2r	rr
s  r�(test_inconsistent_consumer_name_rejected�?TestLaunchpadLoginWith.test_inconsistent_consumer_name_rejected�s;��-��$�.>�
��	
�����)�)��!'�		�	
r"c	�r�[[SS/S9nUR[[R
SSS/US9 g)z=Catch an attempt to specify inconsistent allow_access_levels.r��FOO�r��allow_access_levelsN�BAR)r�r&r
rr
s  r�.test_inconsistent_allow_access_levels_rejected�ETestLaunchpadLoginWith.test_inconsistent_allow_access_levels_rejectedsD��-��
���
��	
�����)�)��$�!&��!'�
	�	
r"c�l�Sn[US9nSnUR[[RSUUS9 g)Nc��grr#r#r"r�	callback1�RTestLaunchpadLoginWith.test_inconsistent_credential_save_failed.<locals>.callback1���r")�credential_save_failedc��grr#r#r"r�	callback2�RTestLaunchpadLoginWith.test_inconsistent_credential_save_failed.<locals>.callback2r.r"�app name)r�r/)rrurvrr�)rr,r�r1s    r�(test_inconsistent_credential_save_failed�?TestLaunchpadLoginWith.test_inconsistent_credential_save_failedsB��	�'�i�H��	�	
�����)�)��"�#,�	�	
r"c�>�[R"SS/S9nURURRR
S5 URURRRS5 URURRS/5 g)Nr�r$r%)	rr�rr�r�r�r�r
r&�rr�s  r�test_non_desktop_integration�3TestLaunchpadLoginWith.test_non_desktop_integration#s���'�1�1�$�5�'�
�	�	
����.�.�7�7�;�;�Z�H�����.�.�7�7�H�H�$�O�����*�*�>�>���	
r"c�~�[R"SS/S9nURURRS/5 g)Nrr$)r&�DESKTOP_INTEGRATION)rr�rr
r&r7s  r�<test_desktop_integration_doesnt_happen_without_consumer_name�STestLaunchpadLoginWith.test_desktop_integration_doesnt_happen_without_consumer_name0s@��
'�1�1��U�G�
�	�	
����*�*�>�>�
"�#�	
r"c�j�[5n[5n[R"SUR[UUS9nURURRR[R5 URURRRS5 URURRS/5 [[[ R"R%URSS5UU[R&S9nURUR(U5 g)Nr3)r�r��timeout�
proxy_infor;r�r�)r�r�r?r@r�)�objectrr�r�r�rr��access_tokenr�r�ACCESS_TOKEN_KEYr�r�r
r&�dictr�r�r�r�r)rr?r@r��expected_argumentss     r�*test_no_credentials_creates_new_credential�ATestLaunchpadLoginWith.test_no_credentials_creates_new_credential=s����(���X�
�&�1�1��!�]�]�%��!�
�	�	
����!�!�.�.�2�2�(�9�9�	
�	
����!�!�*�*�;�;�Z�	
�	
����*�*�>�>�
"�#�	
�"�%��'�'�,�,�t�}�}�.?��I��!�&�6�6�
��	
����1�1�3E�Fr"c��[R"SUR[S9nUR	UR
RRS5 UR	UR
RRS5 [RRURSSS5nUR[RRU55 g)z)Test the anonymous login helper function.zanonymous access)r�r��r�r�N)r�login_anonymouslyr�r�rr�rBr��secretr�r�r�r��exists)rr�r�s   r�test_anonymous_login�+TestLaunchpadLoginWith.test_anonymous_login_s���&�8�8��!�]�]�%�
�	�
	
����.�.�;�;�?�?��D�����.�.�;�;�B�B�B�G��7�7�<�<��M�M�,�m�=O�
��	
��������(8�9�:r"c��[R"[RRURSS55 [RRURSSS5n[SS[
SS5S9nURU5 [5n[5nSn[R"SUR[UUUS	9n[[UUU[RRURSS
5S9nUR5H%up�URUn
URX�5 M' g)Nr�r�r3zconsumer_secret:42z
access_key:84zaccess_secret:168)�consumer_secretrBr�)r�r�r?r@r�r�)r�r?r@r�r�)r��makedirsr�r�r�rr�save_to_pathrArr�r�rDrrr)r�credentials_file_pathr�r?r@r�r�rEr��expected�actuals           r�-test_existing_credentials_arguments_passed_on�DTestLaunchpadLoginWith.test_existing_credentials_arguments_passed_onos��	����G�G�L�L����(9�=�I�	
�!#������M�M�,�m�Z�!
��"��0�$�_�6I�J�
��
	� � �!6�7��(���X�
���&�1�1��!�]�]�%��!��

�	�"�%��!���'�'�,�,�t�}�}�.?��I�
��0�5�5�7�M�C��-�-�c�2�F����V�.�8r"c	��[RRS5nUR[RS'[R
"S[S9nUbU[RS'O[RS	URSn[RR[RRUSS55nURU[RRURS55 UR[RRRUSS555 g)N�HOMEr3r�r�z..z
.launchpadlibr�)r�r�r�r�rr�r�rr��abspathr�rrCrL)r�old_homer��	cache_dirr�s     r�test_None_launchpadlib_dir�1TestLaunchpadLoginWith.test_None_launchpadlib_dir�s����:�:�>�>�&�)��!�]�]��
�
�6��&�1�1��\�
�	���!)�B�J�J�v���
�
�6�"��,�,�W�5�	��7�7�?�?�2�7�7�<�<�	�4��+N�O������b�g�g�l�l�4�=�=�/�J�	
�	
����G�G�N�N������-�/@�'�J�
�	
r"c�p�[R"SS5nURURSS5 [R"S[R
S5nURURS[R
S5 SnUR
[[RSS5 g)Nr3r0r�z"https://api.staging.launchpad.net/)r3zhttps://r�)rr�rrrrNrurvr7s  r�test_short_service_name�.TestLaunchpadLoginWith.test_short_service_name�s���&�1�1�*�i�H�	�����$�$�^�4�0�	
�'�1�1���*�*�9�5�
�	�	
����$�$�^�4����y�)�	
�-�	�����*�5�5�z�5�	
r"c�.�[R"SSS9 g)Nr��)�max_failed_attemptsrr7s r�!test_max_failed_attempts_accepted�8TestLaunchpadLoginWith.test_max_failed_attempts_accepted�s��	�%�%�o�1�Mr"�r�)r$r%r&r'r(r8r�r�r�r�rrrrr�r�rr!r(r4r8r<rFrMrVr]r`rer)�
__classcell__)r�s@rr�r�Xs����+�+�%�:�.L�&L�E�2
�:;�E�
?�
<�


�
�

�
�&
�
� G�D;� $/�L
�2
�2N�Nr"r�c�$�\rSrSrSrSrSrSrg)�TestDeprecatedLoginMethodsi�z2Make sure the deprecated login methods still work.c�n�[R"SS9n[R"S5 [R"S[5 [R
"SSS5 UR
[U5S5 UR
US	R[5 SSS5 g!,(df   g=f)
NTr;r=r�r��tokenrKr>r)
r?r@rA�PendingDeprecationWarningr�loginrrBrErF�rrIs  r�test_login_is_deprecated�3TestDeprecatedLoginMethods.test_login_is_deprecated�s~��
�
$�
$�D�
1�V��!�!�(�+��!�!�(�,E�F��$�$�Z��(�C����S��[�!�,����V�A�Y�/�/�1C�D�2�
1�
1�s�BB&�&
B4c��[R"SS9n[R"S5 [R"S[5 [R"SS5 [
R"S5 UR[USR5S5 URUSR[5 SSS5 g!,(df   g=f)	NTr;r=r�z.*next release of cryptographyr�rz�The Launchpad.get_token_and_login() method is deprecated. You should use Launchpad.login_anonymous() for anonymous access and Launchpad.login_with() for all other purposes.)r?r@rArm�filterwarningsr�get_token_and_loginrrH�messagerErFros  r�&test_get_token_and_login_is_deprecated�ATestDeprecatedLoginMethods.test_get_token_and_login_is_deprecated�s���
�
$�
$�D�
1�V��!�!�(�+��!�!�(�,E�F��#�#��;�
�
�2�2�:�>�����F�1�I�%�%�&�L�
�
���V�A�Y�/�/�1C�D�2�
1�
1�s�B*C�
Cr#N)r$r%r&r'r(rprvr)r#r"rrjrj�s��<�E�Er"rjc���\rSrSrSrSr\R"\S\	"S55S5r
\R"\S\	"S55S5r\R"\S\	"S	55S
5rSr
g)
�!TestCredenitialSaveFailedCallbacki�c�r�[5[Rl[R
"5Ulgr�rr�r��socketr�r�r�r7s rr8�'TestCredenitialSaveFailedCallback.setUp��%��)9�(:����%� �(�(�*��
r"c�v�[[Rl[R"UR
5 gr�r|r�r�r�r�r�r7s rr��*TestCredenitialSaveFailedCallback.tearDown�� ��(.����%��
�
�d�m�m�$r"�_is_sudoc��g�NFr#r#r"r�<lambda>�*TestCredenitialSaveFailedCallback.<lambda>����ur"c�,^�/mU4Sjn[RRURS5nSn[	[55 [R"SUUUS9 UR[T5S5 SSS5 g!,(df   g=f)Nc�(>�TRS5 gr)�append)�callback_calleds�r�callback�PTestCredenitialSaveFailedCallback.test_credentials_save_failed.<locals>.callbacks���
�"�"�4�(r"r�rr�)r�r�r/r>)
r�r�r�r�r
rrr�rrB)rr�r�r�r�s    @r�test_credentials_save_failed�>TestCredenitialSaveFailedCallback.test_credentials_save_failed�sw���
��	)�
�7�7�<�<��
�
�~�F��0��
�.�*�
+��)�)��)�!1�'/�	
�
���S��1�1�5�,�
+�
+�s�	3B�
Bc��gr�r#r#r"rr�r�r�r"c	��[RRURS5nSn[	[55 UR
[[RSUUS9 SSS5 g!,(df   g=f�Nr�rr�r�)
r�r�r�r�r
rru�RuntimeErrorrr��rr�r�s   r�:test_default_credentials_save_failed_is_to_raise_exception�\TestCredenitialSaveFailedCallback.test_default_credentials_save_failed_is_to_raise_exceptionsa���7�7�<�<��
�
�~�F��0��
�.�*�
+�����"�-�-��)�!1�
�
�,�
+�
+�s�&A/�/
A=c��g)NTr#r#r"rr�r� s��tr"c���[RRURS5nSn[	[55 [R"SUUS9 SSS5 g!,(df   g=fr�)r�r�r�r�r
rrr�r�s   r�>test_credentials_save_fail_under_sudo_does_not_raise_exception�`TestCredenitialSaveFailedCallback.test_credentials_save_fail_under_sudo_does_not_raise_exception sP���7�7�<�<��
�
�~�F��0��
�.�*�
+��)�)��)�!1�
�,�
+�
+�s�A � 
A.rgN)r$r%r&r'r8r�rrAr�staticmethodr�r�r�r)r#r"rryry�s���+�%��\�\�$�j�,�}�2M�N�6�O�6�,�\�\�$�j�,�}�2M�N��O���\�\�$�j�,�|�2L�M�
�N�
r"ryc��\rSrSrSrSr\R"\S\	"S55S5r
\R"\S\	"S55S5rS	rg
)�TestMultipleSitesi.c�r�[5[Rl[R
"5Ulgrr{r7s rr8�TestMultipleSites.setUp3r~r"c�v�[[Rl[R"UR
5 grr�r7s rr��TestMultipleSites.tearDown:r�r"r�c��gr�r#r#r"rr��TestMultipleSites.<lambda>>r�r"c���[RRURS5n[	5nSnSn[U5 [R"UUUS9nURRRnSSS5 [URR55SSnURX75 URWU5 URXvS-U-5 g!,(df   Nr=f)Nr�rzSuper App 3000r�rr>�@)r�r�r�r�rr
rr�r�r�r��list�datarOrGr)rr�r�r�r�r�r��application_keys        r�"test_components_of_application_key�4TestMultipleSites.test_components_of_application_key>s����7�7�<�<��
�
�~�F��!�#��0��+��
�'�
"�*�5�5� �)�!1��I�
&�1�1�:�:�>�>�M�
#��w�|�|�0�0�2�3�A�6�q�9��
	
�
�
�l�4��
�
�m�_�5�
	
����#�*=��*L�M�'#�
"�s�7C'�'
C5c��gr�r#r#r"rr�r�Yr�r"c�V�[RRURS5n[	5nUR
(aS5e[
U5 [R"SSUS9 [R"SSUS9 SSS5 [UR
R55S:Xde[UR
R55SS	n[UR
R55S	S	nURX45 g!,(df   N�=f)
Nr�z$oops, a fresh keyring has data in itrzhttp://alpha.example.com/r�zhttp://beta.example.com/�rr>)
r�r�r�r�rr�r
rr�rBrOr�r�)rr�r��application_key_1�application_key_2s     r�test_same_app_different_servers�1TestMultipleSites.test_same_app_different_serversYs����7�7�<�<��
�
�~�F��!�#���<�<�G�!G�G��
�'�
"�
�)�)�"�8�!1�
�

�)�)�"�7�!1�
�#� �7�<�<�$�$�&�'�1�,�,�,� ����!2�!2�!4�5�a�8��;�� ����!2�!2�!4�5�a�8��;�����-�A�)#�
"�s�-D�
D(rgN)
r$r%r&r'r8r�rrArr�r�r�r)r#r"rr�r�.s`��
+�%��\�\�$�j�,�}�2M�N�N�O�N�4�\�\�$�j�,�}�2M�N�B�O�Br"r�),r(�
contextlibrr�r�r|r�r��unittest�
unittest.mockrr?�lazr.restfulclient.resourcer�launchpadlib.credentialsrrr�r�launchpadlib.launchpadr	r
�launchpadlib.testing.helpersrrr
rrrrrr��TestCaserr+r}r�r�r�r�r�rjryr�r#r"r�<module>r�s'��"%�%�	�
�
������3��
��,�C�����
)��I�h�/�/�I�qG�h�'�'�qG�h5
��):�):�5
�p 
�(�*;�*;� 
�F�H�,=�,=��<�8�;L�;L��2-�(�#�#�-�rN�[�rN�jE��E�<@��(9�(9�@�FEB��)�)�EBr"

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 197 B 0644
test_credential_store.cpython-313.pyc File 13.46 KB 0644
test_http.cpython-313.pyc File 11.72 KB 0644
test_launchpad.cpython-313.pyc File 40.67 KB 0644
Filemanager