Ñò
³'Lc           @€  s¯  d  d k  l Z d  d k Z d  d k Z d  d k Z d  d k Z d  d k Z d  d k Z d  d k Z d  d k	 Z	 d  d k
 Z
 d  d k Z d  d k Z d  d k l Z d Z e i d ƒ d „  ƒ Z e i d ƒ d „  ƒ Z e i d	 ƒ d
 „  ƒ Z e i d ƒ d „  ƒ Z e i d ƒ d „  ƒ Z e i d ƒ d „  ƒ Z e i d ƒ d „  ƒ Z e i d ƒ d „  ƒ Z e i d ƒ d „  ƒ Z e i d ƒ d „  ƒ Z e i d ƒ d „  ƒ Z e i d ƒ d „  ƒ Z e i d ƒ d „  ƒ Z e i d ƒ d „  ƒ Z e i d ƒ d „  ƒ Z e i d ƒ d „  ƒ Z  e i d  ƒ d! „  ƒ Z! d" „  Z" e i d ƒ d# „  ƒ Z# e i d$ ƒ d% „  ƒ Z$ e i d& ƒ d' „  ƒ Z% e i d( ƒ d) „  ƒ Z& d S(*   iÿÿÿÿ(   t   with_statementN(   t	   BasicAuthsQ  This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...
This is a relatively long body, that we send to the client...t   /c         C€  s)   | i  |  ƒ } t i | i ƒ  d ƒ d  S(   Nt   welcome(   t   requestt   tt   eqt   body_string(   t   ut   ct   r(    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_001O   s    s   /unicodec         C€  s/   | i  |  ƒ } t i | i d d ƒ d ƒ d  S(   Nt   charsets   utf-8u   Ã©Ã Ã¹@(   R   R   R   R   (   R   R	   R
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_002T   s    s   /Ã©Ã Ã¹c         C€  s<   | i  |  ƒ } t i | i ƒ  d ƒ t i | i d ƒ d  S(   Nt   okiÈ   (   R   R   R   R   t
   status_int(   R   R	   R
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_003Y   s    s   /jsonc         C€  sb   | i  |  d h d d 6ƒ} t i | i d ƒ | i  |  d h d d 6ƒ} t i | i d ƒ d  S(   Nt   headerss   application/jsons   Content-TypeiÈ   s
   text/plaini  (   R   R   R   R   (   R   R	   R
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_004_   s    s   /unkownc         C€  s3   | i  |  d h d d 6ƒ} t i | i d ƒ d  S(   NR   s   application/jsons   Content-Typei”  (   R   R   R   R   (   R   R	   R
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_005g   s    s   /query?test=testingc         C€  s<   | i  |  ƒ } t i | i d ƒ t i | i ƒ  d ƒ d  S(   NiÈ   R   (   R   R   R   R   R   (   R   R	   R
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_006l   s    s#   http://e-engura.com/images/logo.gifc         C€  sŽ   | i  |  ƒ } | i GHt i | i d ƒ t i d d ƒ \ } } t i | d ƒ } | i	 | i
 ƒ  ƒ | i ƒ  t i t i | ƒ d ƒ d  S(   NiÈ   t   suffixs   .gift   wbt   gif(   R   t   statusR   R   R   t   tempfilet   mkstempt   ost   fdopent   writeR   t   closet   imghdrt   what(   R   R	   R
   t   fdt   fnamet   f(    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_007s   s    
c   	      C€  sº   | i  |  ƒ } t i | i d ƒ t i d d ƒ \ } } t i | d ƒ } | i ƒ  i	 i
 ƒ  } z+ | ~ } x | D] } | i | ƒ qv WWd  QX| i ƒ  t i t i | ƒ d ƒ d  S(   NiÈ   R   s   .gifR   R   (   R   R   R   R   R   R   R   R   t   body_streamt   __exit__t	   __enter__R   R   R   R    (	   R   R	   R
   R!   R"   R#   t   _[1]t   bodyt   block(    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_008   s    # 
s	   /redirectc         C€  sr   t  | _ | i |  ƒ } d |  i d d ƒ d } t i | i d ƒ t i | i ƒ  d ƒ t i | i | ƒ d  S(   Ns   %s/complete_redirectR   i   i    iÈ   R   (	   t   Truet   follow_redirectR   t   rsplitR   R   R   R   t	   final_url(   R   R	   R
   t   complete_url(    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_009Œ   s    	c         C€  s2   | i  |  d d d ƒ} t i | i ƒ  d ƒ d  S(   Nt   POSTR)   t   test(   R   R   R   R   (   R   R	   R
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_010—   s    s   /bytestringc         C€  s2   | i  |  d d d ƒ} t i | i ƒ  d ƒ d  S(   NR2   R)   s   Ã©Ã Ã¹@(   R   R   R   R   (   R   R	   R
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_011   s    c         C€  s2   | i  |  d d d ƒ} t i | i ƒ  d ƒ d  S(   NR2   R)   u   Ã©Ã Ã¹@s   Ã©Ã Ã¹@(   R   R   R   R   (   R   R	   R
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_012£   s    c      	   C€  st   | i  |  d d d d h d d 6ƒ} t i | i d ƒ | i  |  d d d d h d d 6ƒ} t i | i d	 ƒ d  S(
   NR2   R)   R3   R   s   application/jsons   Content-TypeiÈ   s
   text/plaini  (   R   R   R   R   (   R   R	   R
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_013©   s    s   /emptyc      	   C€  st   | i  |  d d d d h d d 6ƒ} t i | i d ƒ | i  |  d d d d h d d 6ƒ} t i | i d ƒ d  S(   NR2   R)   t    R   s   application/jsons   Content-TypeiÈ   (   R   R   R   R   (   R   R	   R
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_014´   s    c      	   C€  s<   | i  |  d d d d h d d 6ƒ} t i | i d ƒ d  S(   NR2   R)   R8   R   s   application/jsons   Content-TypeiÈ   (   R   R   R   R   (   R   R	   R
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_015¿   s    s   /1Mc      	   C€  s·   t  i i t  i i t ƒ d ƒ } t | d ƒ i i ƒ  } zs | ~ } t t  i	 | i
 ƒ  ƒ d ƒ } | i |  d d | ƒ} t i | i d ƒ t i t | i ƒ  ƒ | ƒ Wd  QXd  S(   Nt   1Mt   rbi   R2   R)   iÈ   (   R   t   patht   joint   dirnamet   __file__t   openR&   R'   t   intt   fstatt   filenoR   R   R   R   R   (   R   R	   t   fnR(   R#   t   lR
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_016Æ   s    !&s   /largec         C€  se   | i  |  d d t ƒ} t i | i d ƒ t i t | d ƒ t t ƒ ƒ t i | i ƒ  t ƒ d  S(   NR2   R)   iÈ   s   content-length(   R   t   LONG_BODY_PARTR   R   R   RB   t   lenR   (   R   R	   R
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_017Ð   s     c          C€  s+   x$ t  d ƒ D] }  t i d t ƒ q Wd  S(   Ni
   s   /large(   t   rangeR   t   client_requestRJ   (   t   i(    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt	   test_0018Ù   s     c         C€  s2   | i  |  d d d ƒ} t i | i ƒ  d ƒ d  S(   Nt   PUTR)   R3   (   R   R   R   R   (   R   R	   R
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_019Ý   s    s   /authc         C€  s²   t  d d ƒ } | i i | ƒ | i |  ƒ } t i | i d ƒ | i i | ƒ t i t | i i ƒ d ƒ t  d d ƒ } | i i | ƒ | i |  ƒ } t i | i d ƒ d  S(   NR3   iÈ   i    t   test2i“  (	   R   t   filterst   addR   R   R   R   t   removeRI   (   R   R	   t   auth_filterR
   t   auth_filter1(    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_020ã   s    s   /listc         C€  sZ   d d g } | i  |  d d | d d
 g ƒ} t i | i d ƒ t i | i ƒ  d	 ƒ d  S(   Ns   line 1
s    line2
R2   R)   R   s   Content-Lengtht   14iÈ   s   line 1
 line2
(   s   Content-LengthRX   (   R   R   R   R   R   (   R   R	   t   linesR
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_021ó   s
    s   /chunkedc         C€  sZ   d d g } | i  |  d d | d d
 g ƒ} t i | i d ƒ t i | i ƒ  d	 ƒ d  S(   Ns   line 1
s    line2
R2   R)   R   s   Transfer-Encodingt   chunkediÈ   s   7
line 1

7
 line2

0

(   s   Transfer-Encodings   chunked(   R   R   R   R   R   (   R   R	   RY   R
   (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   test_022û   s
    ('   t
   __future__R    t   cgiR   R   t   sockett	   threadingt   Queuet   urlparset   sysR   t   timeR   t   restkit.filtersR   RH   RL   R   R   R   R   R   R   R$   R+   R1   R4   R5   R6   R7   R9   R:   RG   RJ   RN   RP   RW   RZ   R\   (    (    (    sG   /Users/benoitc/Work/couchdbkit_env/src/restkit/tests/004-test-client.pyt   <module>   sF   9
		