%PDF- %PDF-
Direktori : /lib/python3/dist-packages/launchpadlib/testing/__pycache__/ |
Current File : //lib/python3/dist-packages/launchpadlib/testing/__pycache__/helpers.cpython-312.pyc |
� �{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"