Your IP : 216.73.216.52


Current Path : /usr/lib/python3/dist-packages/lazr/restfulclient/tests/__pycache__/
Upload File :
Current File : //usr/lib/python3/dist-packages/lazr/restfulclient/tests/__pycache__/example.cpython-38.pyc

U

���T��@s�dZeZdgZzddlmZWn ek
r>ddlmZYnXddlm	Z	m
Z
Gdd�de	�ZGdd�de	�ZGd	d�de
�Z
d
S)z5Test client for the lazr.restful example web service.�CookbookWebServiceClient�)�quote)�CollectionWithKeyBasedLookup�ServiceRootc@seZdZdZdd�ZdZdS)�CookbookSetz>A custom subclass capable of cookbook lookup by cookbook name.cCs t|jj���dtt|��S)z>Transform a cookbook name into the URL to a cookbook resource.z
cookbooks/)�str�_root�	_root_uri�ensureSlashr��self�id�r�B/usr/lib/python3/dist-packages/lazr/restfulclient/tests/example.py�_get_url_from_id%s
�
�zCookbookSet._get_url_from_idZcookbookN��__name__�
__module__�__qualname__�__doc__rZ
collection_ofrrrrr"src@seZdZdZdd�ZdZdS)�	RecipeSetz8A custom subclass capable of recipe lookup by recipe ID.cCst|jj���dt|�S)z8Transform a recipe ID into the URL to a recipe resource.zrecipes/)rrr	r
rrrrr0szRecipeSet._get_url_from_idZrecipeNrrrrrr-srcsFeZdZeej�Zeed<eed<dZdZ	ee	df�fdd�	Z
�ZS)rZrecipesZ	cookbookszhttp://cookbooks.dev/z1.0Ncstt|�jd|||d�dS)N)�cache�version)�superr�__init__)rZservice_rootrr��	__class__rrr@s
�z!CookbookWebServiceClient.__init__)rrr�dictrZRESOURCE_TYPE_CLASSESrrZDEFAULT_SERVICE_ROOTZDEFAULT_VERSIONr�
__classcell__rrrrr7s
�N)r�typeZ
__metaclass__�__all__Zurllib.parser�ImportErrorZurllibZlazr.restfulclient.resourcerrrrrrrrr�<module>s�