%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/keyring/testing/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/keyring/testing/__pycache__/backend.cpython-312.pyc

�

�e���~�dZddlZddlZddlZddlmZddlmZdZe	d�eD��dkDsJ�d	�Z
Gd
�d�Zy)z)
Common test functionality for backends.
�N�)�
random_string)�errorsuHזהכיףסתםלשמועאיךתנצחקרפדעץטובבגןξεσκεπάζωτηνψυχοφθόραβδελυγμίαСъешьжеещёэтихмягкихфранцузскихбулокдавыпейчаюЖълтатадюлябешещастливачепухъткойтоцъфназамръзнакатогьонc#�2K�|]}t|����y�w�N��ord)�.0�chars  �9/usr/lib/python3/dist-packages/keyring/testing/backend.py�	<genexpr>r
s����
/��3�t�9�
/�s��c�&�td�|D��S)Nc3�NK�|]}dt|�cxkxrdknc���y�w)� rNr)r
�cs  rr
z%is_ascii_printable.<locals>.<genexpr>s!����-�a�r�S��V�!�c�!�!�-�s�#%)�all)�ss r�is_ascii_printablers���-�1�-�-�-�c���eZdZdZej
ejzZejd��d��Z
d�Zd�Zd�Z
d�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�BackendBasicTestszETest for the keyring's basic functions. password_set and password_getT)�autousec��|j�|_t�|_|j	|j
�yr)�init_keyring�keyring�set�credentials_created�addfinalizer�cleanup)�self�requests  r�_init_propertiesz"BackendBasicTests._init_properties&s.���(�(�*���#&�5�� ����T�\�\�*rc�X�|jD]}|jj|��yr)rr�delete_password)r!�items  rr zBackendBasicTests.cleanup,s+���,�,�	0�D�(�D�L�L�(�(�$�/�	0rc�x�|jj|||�|jj||f�yr)r�set_passwordr�add)r!�service�username�passwords    rr(zBackendBasicTests.set_password0s3��	
���!�!�'�8�X�>�� � �$�$�g�x�%8�9rc���|j}|j||��J�|j|||�|j||�|k(sJ�|j||d�|j||�dk(sJ�y)N�)r�get_passwordr()r!r*r+r,rs     r�
check_set_getzBackendBasicTests.check_set_get6s����,�,���#�#�G�X�6�>�>�>�	
���'�8�X�6��#�#�G�X�6�(�B�B�B�	
���'�8�R�0��#�#�G�X�6�"�<�<�<rc�l�td�}td�}td�}|j|||�y�N�)rr0�r!r,r+r*s    r�test_password_set_getz'BackendBasicTests.test_password_set_getDs2�� ��$�� ��$����#�����7�H�h�7rc��td�}td�}|jj||d�|jj||d�y)Nr3r.z	non-blank)rrr()r!r*r+s   r�test_set_after_set_blankz*BackendBasicTests.test_set_after_set_blankJsB����#�� ��$�����!�!�'�8�R�8����!�!�'�8�[�Arc��td|j�}td|j�}td|j�}|j|||�yr2)r�DIFFICULT_CHARSr0r4s    r�test_difficult_charsz&BackendBasicTests.test_difficult_charsPsJ�� ��T�%9�%9�:�� ��T�%9�%9�:����D�$8�$8�9�����7�H�h�7rc�6�td|j�}td|j�}td|j�}|jj|||�|jj	||�|jj||��J�yr2�rr9rr(r%r/r4s    r�test_delete_presentz%BackendBasicTests.test_delete_presentVs�� ��T�%9�%9�:�� ��T�%9�%9�:����D�$8�$8�9�����!�!�'�8�X�>����$�$�W�h�7��|�|�(�(��(�;�C�C�Crc��td|j�}td|j�}tjtj
�5|jj||�ddd�y#1swYyxYwr2)rr9�pytest�raisesr�PasswordDeleteErrorrr%)r!r+r*s   r�test_delete_not_presentz)BackendBasicTests.test_delete_not_present^sa�� ��T�%9�%9�:����D�$8�$8�9��
�]�]�6�5�5�
6�	<��L�L�(�(��(�;�	<�	<�	<�s�A6�6A?c��td|j�}td|j�}td|j�}td|j�}|jj|||�|j|||�|jj	||�|jj||�|k(sJ�yr2r<)r!�	username1�	username2r,r*s     r�test_delete_one_in_groupz*BackendBasicTests.test_delete_one_in_groupds���!�"�d�&:�&:�;�	�!�"�d�&:�&:�;�	� ��T�%9�%9�:����D�$8�$8�9�����!�!�'�9�h�?����'�9�h�7����$�$�W�i�8��|�|�(�(��)�<��H�H�Hrc�F�t|jj�sJ�yr)rr�name)r!s r�test_name_propertyz$BackendBasicTests.test_name_propertyns��!�$�,�,�"3�"3�4�4�4rc��tdt�}tdt�}tdt�}|j|||�yr2)r�
UNICODE_CHARSr0r4s    r�test_unicode_charsz$BackendBasicTests.test_unicode_charsqs8�� ��]�3�� ��]�3����M�2�����7�H�h�7rc���tdt�td�ztd|j�z}td|�}td|�}td|�}|j|||�y)N�
r3)rrKr9r0)r!�sourcer,r+r*s     r�test_unicode_and_ascii_charsz.BackendBasicTests.test_unicode_and_ascii_charswsk���"�m�,��B��
 ��B�� 4� 4�5�
6�	�
!��V�,�� ��V�,����F�+�����7�H�h�7rc��|j}|jddd�|jddd�|jdd�dk(sJ�|jdd�dk(sJ�|jddd�|jdd�dk(sJ�y	)
z�
        Issue #47 reports that WinVault isn't storing passwords for
        multiple users. This test exercises that test for each of the
        backends.
        �service1�user1�	password1�user2�	password2�service2�user3�	password3N)rr(r/)r!rs  r�test_different_userz%BackendBasicTests.test_different_user�s����,�,�����*�g�{�;����*�g�{�;��#�#�J��8�K�G�G�G��#�#�J��8�K�G�G�G����*�g�{�;��#�#�J��8�K�G�G�Grc�X�|j}|jdd�}|�J�|jddd�|jddd�|jdd�}|�|j|jfdvsJ�|jdd�}|�J�|j|jfdvsJ�y)Nr*rRrSrTrUrV))rSrT)rUrV)r�get_credentialr(r+r,)r!r�creds   r�test_credentialz!BackendBasicTests.test_credential�s����,�,���%�%�i��6���|��|����*�g�{�;����*�g�{�;��%�%�j�$�7���|��
�
�t�}�}�=�B
� 
�	
�
�
�%�%�j�'�:�������
�
�t�}�}�-�2
�
�	
�
rc��tdd��}|jtd|�|jj	�|jj
dk(sJ�y)Nz	fizz buzzz	ignore me)�KEYRING_PROPERTY_FOO_BAR�
OTHER_SETTING�environ)�dict�setattr�osr�set_properties_from_env�foo_bar)r!�monkeypatch�envs   r�test_set_propertiesz%BackendBasicTests.test_set_properties�sH���K�{�S�����B�	�3�/����,�,�.��|�|�#�#�{�2�2�2rc��|jjd��}||jusJ�|jdk(sJ�tjt
�5|jjddd�y#1swYyxYw)N�bar)�foo)r�with_propertiesrmr?r@�AttributeError)r!�alts  r�test_new_with_propertiesz*BackendBasicTests.test_new_with_properties�sk���l�l�*�*�u�*�5���$�,�,�&�&�&��w�w�%����
�]�]�>�
*�	��L�L���	�	�	�s�A7�7BN)�__name__�
__module__�__qualname__�__doc__�string�
whitespace�punctuationr9r?�fixturer#r r(r0r5r7r:r=rBrFrIrLrPrZr^rjrq�rrrr!s���O��'�'�&�*<�*<�<�O��V�^�^�D�!�+�"�+�
0�:�=�8�B�8�D�<�I�5�8�	8�
H�
�,3�rr)rurervr?�utilrrrrK�minrrrzrr�<module>r}sR���
�
�
���w���
/��
/�/�#�5�5�5�.�Q�Qr

Zerion Mini Shell 1.0