| Server IP : 159.223.102.202 / Your IP : 216.73.216.195 Web Server : nginx/1.26.0 System : Linux Gen1-cloudpanel2ubuntu2404-1vcpu-1gb-nyc1-01 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 User : albasshbotta ( 1021) PHP Version : 8.2.19 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"