| Server IP : 138.197.162.186 / Your IP : 216.73.216.184 Web Server : nginx/1.24.0 System : Linux ubuntu-s-1vcpu-512mb-10gb-tor1 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/launchpadlib/testing/__pycache__/ |
Upload File : |
�
�{a � �4 � d Z eZg d�ZddlmZ ddlZddlmZ ddl m
Z
mZmZ e
� Zd� Z G d� d e� Z G d
� de� Z G d� d
e� Zed� � Z G d� d� Z G d� d� Z G d� d� Z G d� d� Z edd� Z edd� Z edd� Zy)zlaunchpadlib testing helpers.)
�BadSaveKeyring�fake_keyring�FauxSocketModule�InMemoryKeyring�NoNetworkAuthorizationEngine�NoNetworkLaunchpad�TestableLaunchpad�nopriv_read_nonprivate�salgado_read_nonprivate�salgado_with_full_permissions� )�contextmanagerN)� Launchpad)�AccessToken�Credentials�RequestTokenAuthorizationEnginec �\ � t t j dt � t u sJ d� �y )N�keyringz>During tests the real keyring module should never be imported.)�getattr�launchpadlib�credentials�missing� � �>/usr/lib/python3/dist-packages/launchpadlib/testing/helpers.py�assert_keyring_not_importedr 2 s+ � ���(�(�)�W�=��H�H�G�H�Hr c �2 � � e Zd ZdZdZ� fd�Zd� Zd� Z� xZS )r a An authorization engine that doesn't open a web browser.
You can use this to test the creation of Launchpad objects and the
storing of credentials. You can't use it to interact with the web
service, since it only pretends to authorize its OAuth request tokens.
z
access_key:84c �H �� t t | �
|i |�� d| _ d| _ y )Nr )�superr �__init__�request_tokens_obtained�access_tokens_obtained)�self�args�kwargs� __class__s �r r z%NoNetworkAuthorizationEngine.__init__B s( �� �
�*�D�:�D�K�F�K�'(��$�&'��#r c �. � | xj dz
c_ y)zsPretend to get a request token from the server.
We do this by simply returning a static token ID.
� zrequest_token:42)r )r"