HOME


Mini Shell 1.0
DIR: /lib/python3/dist-packages/lazr/restfulclient/tests/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/lazr/restfulclient/tests/__pycache__/example.cpython-312.pyc
�

}�;e.	���dZeZdgZ	ddlmZddlm	Z	m
Z
Gd�de	�ZGd�de	�ZGd	�de
�Z
y
#e$r	ddlmZY�7wxYw)z5Test client for the lazr.restful example web service.�CookbookWebServiceClient�)�quote)�CollectionWithKeyBasedLookup�ServiceRootc��eZdZdZd�ZdZy)�CookbookSetz>A custom subclass capable of cookbook lookup by cookbook name.c��t|jjj��dzt	t|��zS)z>Transform a cookbook name into the URL to a cookbook resource.z
cookbooks/)�str�_root�	_root_uri�ensureSlashr��self�ids  �B/usr/lib/python3/dist-packages/lazr/restfulclient/tests/example.py�_get_url_from_idzCookbookSet._get_url_from_id's<��
��
�
�$�$�0�0�2�3��
��C��G�n�
�	
��cookbookN��__name__�
__module__�__qualname__�__doc__r�
collection_of�rrrr$s��H�
��Mrrc��eZdZdZd�ZdZy)�	RecipeSetz8A custom subclass capable of recipe lookup by recipe ID.c�z�t|jjj��dzt|�zS)z8Transform a recipe ID into the URL to a recipe resource.zrecipes/)r
rrr
rs  rrzRecipeSet._get_url_from_id5s.���4�:�:�'�'�3�3�5�6��C�c�"�g�M�Mr�recipeNrrrrrr2s��B�N��Mrrc�f��eZdZeej
�Zeed<eed<dZdZ	ee	df�fd�	Z
�xZS)r�recipes�	cookbookszhttp://cookbooks.dev/z1.0Nc�4��tt|�d|||��y)N)�cache�version)�superr�__init__)r�service_rootr%r$�	__class__s    �rr'z!CookbookWebServiceClient.__init__Es#���	�&��6��,�e�W�	7�	
r)rrr�dictr�RESOURCE_TYPE_CLASSESrr�DEFAULT_SERVICE_ROOT�DEFAULT_VERSIONr'�
__classcell__)r)s@rrr<sJ��� ��!B�!B�C��'0��)�$�)4��+�&�2���O�*���	
�
rN)r�type�
__metaclass__�__all__�urllib.parser�ImportError�urllib�lazr.restfulclient.resourcerrrrrrrr�<module>r6sa�� 8��
����
�"���.���,��
�{�
��C����s�9�A�A