
 KMc           @   s   d  Z  e Z d g Z d d l m Z d d l m Z m Z d e f d     YZ	 d e f d     YZ
 d e f d	     YZ d
 S(   s5   Test client for the lazr.restful example web service.t   CookbookWebServiceClienti(   t   quote(   t   CollectionWithKeyBasedLookupt   ServiceRoott   CookbookSetc           B   s   e  Z d  Z d   Z d Z RS(   s>   A custom subclass capable of cookbook lookup by cookbook name.c         C   s*   t  |  j j j    d t t  |   S(   s>   Transform a cookbook name into the URL to a cookbook resource.s
   cookbooks/(   t   strt   _roott	   _root_urit   ensureSlashR   (   t   selft   id(    (    sD   /usr/lib/python2.7/dist-packages/lazr/restfulclient/tests/example.pyt   _get_url_from_id    s    t   cookbook(   t   __name__t
   __module__t   __doc__R   t   collection_of(    (    (    sD   /usr/lib/python2.7/dist-packages/lazr/restfulclient/tests/example.pyR      s   	t	   RecipeSetc           B   s   e  Z d  Z d   Z d Z RS(   s8   A custom subclass capable of recipe lookup by recipe ID.c         C   s$   t  |  j j j    d t  |  S(   s8   Transform a recipe ID into the URL to a recipe resource.s   recipes/(   R   R   R   R   (   R	   R
   (    (    sD   /usr/lib/python2.7/dist-packages/lazr/restfulclient/tests/example.pyR   +   s    t   recipe(   R   R   R   R   R   (    (    (    sD   /usr/lib/python2.7/dist-packages/lazr/restfulclient/tests/example.pyR   (   s   	c           B   sI   e  Z e e j  Z e e d  <e e d <d Z d Z e e d d  Z
 RS(   t   recipest	   cookbookss   http://cookbooks.dev/s   1.0c         C   s)   t  t |   j d  | d | d | d  S(   Nt   cachet   version(   t   superR    t   __init__t   None(   R	   t   service_rootR   R   (    (    sD   /usr/lib/python2.7/dist-packages/lazr/restfulclient/tests/example.pyR   ;   s    N(   R   R   t   dictR   t   RESOURCE_TYPE_CLASSESR   R   t   DEFAULT_SERVICE_ROOTt   DEFAULT_VERSIONR   R   (    (    (    sD   /usr/lib/python2.7/dist-packages/lazr/restfulclient/tests/example.pyR    2   s   

N(   R   t   typet   __metaclass__t   __all__t   urllibR   t   lazr.restfulclient.resourceR   R   R   R   R    (    (    (    sD   /usr/lib/python2.7/dist-packages/lazr/restfulclient/tests/example.pyt   <module>   s   	
