| Server IP : 39.108.156.168 / Your IP : 216.73.216.104 Web Server : nginx/1.24.0 System : Linux e2.ksyuki.com 6.11.0-25-generic #25~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 17:20:50 UTC 2 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/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"