
\Qc        
   @   s  d  d k  Z  d  d k Z d  d k l Z l Z l Z d  d k l Z d  d k l Z d  d k	 l
 Z
 d  d k l Z d  d k l Z d   Z d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z  d   Z! d   Z" d   Z# d   Z$ d   Z% d    Z& d!   Z' d"   Z( d#   Z) d$   Z* d%   Z+ d&   Z, d'   Z- d(   Z. d)   Z/ d*   Z0 d+   Z1 d,   Z2 d-   Z3 d.   Z4 d/   Z5 d0   Z6 d1   Z7 d2   Z8 d3   Z9 d4   Z: d5   Z; d6   Z< d7   Z= d8   Z> d9   Z? d:   Z@ d;   ZA d<   ZB d=   ZC d>   ZD d?   ZE d@   ZF dA   ZG dB   ZH dC   ZI dD   ZJ dE   ZK dF   ZL dG   ZM dH   ZN dI   ZO dJ   ZP dK   ZQ dL   ZR dM   ZS dN   ZT dO   ZU dP   ZV dQ   ZW dR   ZX dS   ZY dT   ZZ dU   Z[ dV   Z\ dW   Z] dX   Z^ dY   Z_ dZ   Z` d[   Za d\   Zb d]   Zc d^   Zd d_   Ze d`   Zf da   Zg db   Zh dc   Zi dd   Zj de   Zk df   Zl dg   Zm dh   Zn di   Zo dj   Zp dk   Zq dl   Zr dm   Zs dn   Zt do   Zu dp   Zv dq   Zw dr   Zx ds   Zy dt   Zz du   Z{ dv   Z| dw   Z} dx   Z~ dy   Z dz   Z d{   Z d|   Z d}   Z d~   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d S(   iN(   t   eq_t   ok_t   assert_raises(   t   BaseRequest(   t   Request(   t   Response(   t   text_(   t   bytes_c         C   s   | d d g  d g S(   Ns   200 OKs   Content-Types   text/html; charset=utf8t   OK(   s   Content-Types   text/html; charset=utf8(    (   t   environt   start_response(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt
   simple_app   s    
c          C   s  t  i d  }  |  i t  } | i d j p t  | i d j p t  | i d j p t  | i d j p t  | i	 d j p t  d | _ | i d j p t  | i d j p t  d	 | _ d
 i
 | i  d	 j p t  d | _ | i d d j p t  d | _	 | i d d j p t  h d d 6| _ | i d d j p t  | i d" g j p t  | i d d  | i d i d  d j p t  | i t d  t d   | i d i d  d j p t  t d d d d } | i   | i d j p t  t | i d  | i   | i d  j p t  | i d j p t  | i d t d   t t t d t d g  d d |  ` t t t d d  d t d  t t t d  d! d  S(#   Nt   /s   200 OKi   R   t   utf8s	   text/htmli  s   404 Not Founds   Not OKt    s	   iso8859-1s   content-types   text/html; charset=iso8859-1s   text/xmls   text/xml; charset=iso8859-1t   xt   ys
   set-cookiet   ;s   x=y; Path=/s   a bodyt   content_typet   gzips        KTHO GI   t   foot   app_itert   at   bodyt   somebodyt   charsets   unicode bodyt	   wrong_keyt   dummy(   s   content-types	   text/html(   R   t   blankt   get_responseR   t   statust   AssertionErrort   status_codeR   R   R   t   joinR   t   headerst
   headerlistt
   set_cookiet   stripR   R   t   encode_contentt   content_encodingR    t   decode_contentt   NoneR   t	   TypeErrort   iterR	   (   t   reqt   res(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_response   sJ    		 		$$

c          C   s]   t  i d  }  |  i t  } | i d j | i d j p t  | i d j p t  d  S(   NR   s   200 OKi   (   R   R   R   R   R   R    R   (   R,   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_set_response_status_binary9   s
    c          C   sY   t  i d  }  |  i t  } d | _ | i d j p t  | i d j p t  d  S(   NR   t   200i   s   200 OK(   R   R   R   R   R   R    R   (   R,   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt&   test_set_response_status_str_no_reason@   s
    	c          C   sY   t  i d  }  |  i t  } d | _ | i d j p t  | i d j p t  d  S(   NR   t   299i+  s   299 Success(   R   R   R   R   R   R    R   (   R,   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt+   test_set_response_status_str_generic_reasonG   s
    	c          C   sY   t  i d  }  |  i t  } d | _ | i d j p t  | i d j p t  d  S(   NR   i   s   200 OK(   R   R   R   R   R    R   R   (   R,   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_set_response_status_codeN   s
    	c          C   sY   t  i d  }  |  i t  } d | _ | i d j p t  | i d j p t  d  S(   NR   i+  s   299 Success(   R   R   R   R   R    R   R   (   R,   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt,   test_set_response_status_code_generic_reasonU   s
    	c          C   so   t    }  t |  i d  t |  i d  d  |  _ t |  i d   t |  i d   d  |  _ t |  i d   d  S(   Ns	   text/htmls   UTF-8(   R   R    R   R   R)   (   t   r(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_content_type\   s    			c          C   s'   d }  t  t d |   i d |   d  S(   Ns   text/plain;charset=ISO-8859-1R   s   content-type(   R    R   R"   (   t   v(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt    test_init_content_type_w_charseti   s    c          C   s   t    }  |  i d t d d   t |  i i d  d g  |  i t  } t i	 d  i
 |  } t | i d
 d g  d  S(   NR   s   \N{BLACK SQUARE}t   unicode_escapes
   set-cookies   x="\342\226\240"; Path=/R   s   Content-Types   text/html; charset=utf8s
   Set-Cookie(   s   Content-Types   text/html; charset=utf8(   s
   Set-Cookies   x="\342\226\240"; Path=/(   R   R$   R   R    R"   t   getallt   merge_cookiesR   R   R   R   R#   (   R-   t   r2(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_cookiesn   s    		c          C   sR   t  i d  }  |  i t d   } | i d d d t t | i d d  d  S(   NR   t   blahR   t   httponlys
   set-cookies   foo=foo; Path=/; HttpOnly(   R   R   R   R   R$   t   TrueR    R"   (   R,   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_http_only_cookie|   s    c          C   se   t    }  d } |  i i h | d 6 t |  i i d  | g  |  i i   |  i p t  d  S(   Ns   application/x-tests   content-type(   R   R"   t   updateR    R;   t   clearR#   R   (   R6   t   tval(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_headers   s    	c          C   sH   t  d t d g   }  |  i   } t |  i d  t | i d  d  S(   NR   R   (   R   R+   t   copyR    R   (   R6   R=   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_response_copy   s    c          C   so   t    }  |  i d t  |  i p t  |  i   } |  i p t  | i p t  t |  i | i  d  S(   Nt   set_content_md5(   R   t   md5_etagRA   t   content_md5R   RG   R    (   R-   t   res2(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_response_copy_content_md5   s    	c          C   sp   t  i d  }  d |  _ t i d  } |  i t d |   } t | i d  t | i	 d  t
 | i  d  S(   NR   t   HEADR   R   i   R   (   R   R   t   methodt   iot   BytesIOR   R   R    R    R   R   t   closed(   R,   R   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_HEAD_closes   s    	c          C   s^   t  i d d d d d }  t d t  } d   } | |  i |  } t |  p t  d  S(   NR   RO   RN   t   if_none_matcht   nonet   conditional_responsec         S   s   d  S(   N(    (   R   R#   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyR
      s    (   R   R   R   RA   R	   t   listR   (   R,   R-   R
   t   result(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt5   test_HEAD_conditional_response_returns_empty_response   s    		c          C   sQ   t  i d d d d d
 }  t d d t } |  i |  i d	 j p t  d  S(   NR   RO   RN   t   rangei   i   s   Are we not men?RV   R   (   i   i   (   R   R   R   RA   R   R   R   (   R,   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt3   test_HEAD_conditional_response_range_empty_response   s
    	c          C   sV   t  i d d d }  t d d g d t d d  } |  i |  } t | i d	  d  S(
   NR   RT   R   R   s   foo
RV   t   etagt   bari   (   R   R   R   RA   R   R    R    (   R,   t   resp(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt-   test_conditional_response_if_none_match_false   s
    c          C   sV   t  i d d d }  t d d g d t d d  } |  i |  } t | i d  d  S(	   NR   RT   R   R   s   foo
RV   R\   i0  (   R   R   R   RA   R   R    R    (   R,   R^   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt,   test_conditional_response_if_none_match_true   s
    c          C   s6  t  i d d h d d 6}  t  i d d h d d 6} t d d g d t d	 d
  } t d d g d t d h d d	 6 } xA |  | g D]3 } x* | | g D] } | i |  i d j q Wq Wt d d g d t d h d d	 6 } t d d g d t d h d d	 6 } | i |  i d j |  i |  d j d  S(   NR   R"   s   "bar"s   if-none-matchs   W/"bar"R   s   foo
RV   R\   R]   i0  s   "foo"s   W/"foo"i   (   R   R   R   RA   R   R    (   R,   t   req_weakR^   t	   resp_weakt   rqt   rpR=   t   r2_weak(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt,   test_conditional_response_if_none_match_weak   s    %  %%c          C   s   d d k  l  }  l } t i d d |  d d d d d	 d	  } t d
 d g d t d | i | d d   } | i |  } t | i	 d  d  S(   Ni(   t   datetimet	   timedeltaR   t   if_modified_sincei  i   i   i   i    R   s   foo
RV   t   last_modifiedt   secondsi   i0  (
   Rg   Rh   R   R   R   RA   Ri   R   R    R    (   Rg   Rh   R,   R^   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt1   test_conditional_response_if_modified_since_false   s    *c          C   s   d d k  l  }  l } t i d d |  d d d d d	 d	  } t d
 d g d t d | i | d d   } | i |  } t | i	 d  d  S(   Ni(   Rg   Rh   R   Ri   i  i   i   i   i    R   s   foo
RV   Rj   Rk   i   i   (
   Rg   Rh   R   R   R   RA   Ri   R   R    R    (   Rg   Rh   R,   R^   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt0   test_conditional_response_if_modified_since_true   s    *c          C   s   t  i d d d }  t d d g d d d t  } |  i |  } t | i d	  t | i i d   t | i i
 d   t | i i d  t | i d
  d  S(   NR   RZ   s   bytes=100-200R   s   foo
t   content_lengthi   RV   i  s.   Requested range not satisfiable: bytes=100-200(   R   R   R   RA   R   R    R    t   content_ranget   startR)   t   stopt   lengthR   (   R,   R^   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt8   test_conditional_response_range_not_satisfiable_response   s    	c          C   s   t  i d d d d d }  t d d g d d	 d
 t  } |  i |  } t | i d  t | i i d   t | i i
 d   t | i i d	  t | i d  d  S(   NR   RO   RN   RZ   s   bytes=100-200R   s   foo
Rn   i   RV   i  R   (   R   R   R   RA   R   R    R    Ro   Rp   R)   Rq   Rr   R   (   R,   R^   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt=   test_HEAD_conditional_response_range_not_satisfiable_response   s    	c          C   s`   t    }  d |  _ |  i   t |  i  t d |  i j  t |  i d  t |  i d   d  S(   Ns   In A.D. 2101
War was beginning.
Captain: What happen ?
Mechanic: Somebody set up us the bomb.
Operator: We get signal.
Captain: What !
Operator: Main screen turn on.
Captain: It's You !!
Cats: How are you gentlemen !!
Cats: All your base are belong to us.
Cats: You are on the way to destruction.
Captain: What you say !!
Cats: You have no chance to survive make your time.
Cats: HA HA HA HA ....
Captain: Take off every 'zig' !!
Captain: You know what you doing.
Captain: Move 'zig'.
Captain: For great justice.s   
t   pN8sSTUrEaPRzmurGptqmw(   R   R   RJ   R   R\   R    RK   R)   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_md5_etag   s    		
c          C   s6   t    }  d } |  i | d t t |  i d  d  S(   Ns+   The quick brown fox jumps over the lazy dogRI   s   nhB9nTcrtoJr2B01QqQZ1g==(   R   RJ   RA   R    RK   (   R-   R   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_md5_etag_set_content_md5  s    	c          C   s0   t    }  d |  _ |  i   t |  i d  d  S(   Ns   There be dragons(   R   R   R(   R    (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt(   test_decode_content_defaults_to_identity  s    		
c          C   s_   t    }  d } t i |  d d !|  _ d |  _ |  i   t |  i |  t |  i d   d  S(   Ns   Hey Hey Heyi   it   deflate(   R   t   zlibt   compressR   R'   R(   R    R)   (   R-   R   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt    test_decode_content_with_deflate   s    		
c             s  t  d d d }  t i d d d } | i |   } t | i d  t | i d  t | i d  t i d  } | i |   } t | i d  t | i d  t | i d  t  d	 d g d  } t | i d   t | i d  t | i d  t  d	 d g d d d
    t   i d
  t	 t
   f d    t i d d d } t |  _ | i |   } t | i d  t | i d  t | i d  d  S(   NR   i
   Rn   R   RO   RN   i   R   R   i   c              s     i  S(    (   R   (    (   t   r4(    s2   /home/chrism/projects/webob/tests/test_response.pyt   <lambda>B  s    RZ   i    i   i   t   xxxxxt
   xxxxxxxxxxR   R   (   i    i   (   R   R   R   R   R    R    R   Rn   R)   R   R   RA   RV   (   t   r0t   req_headt   r1t   req_getR=   t   r3t	   req_ranget   r5(    (   R}   s2   /home/chrism/projects/webob/tests/test_response.pyt   test_content_length+  s2    		c          C   s  t  i d d d }  x d g d d g d d d	 g d
 d g d
 d d	 g d d d	 g d d d d	 g d d d g d d d d	 g d d d g g
 D]k } t d | d d d t  } |  i |  } t t | i  d d d g  t | i d | i | f  q Wd  S(   NR   RZ   i   i   t   012345t   0t   12345t   1234t   5t   01t   2345t   234t   012t   34t   3t   4t   45t   12t   345R   Rn   i   RV   (   i   i   (	   R   R   R   RA   R   R    RW   Ro   R   (   R,   R   R6   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_app_iter_rangeK  s(    		 	c          C   sB   d d d     Y}  t  d |     } t | i d d  d  d  S(	   Nt   FakeAppIterc           B   s   e  Z d    Z RS(   c         S   s   d | | f S(   Ns   you win(    (   t   selfRp   Rq   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   app_iter_ranged  s    (   t   __name__t
   __module__R   (    (    (    s2   /home/chrism/projects/webob/tests/test_response.pyR   c  s   R   i   i(   s   you win(    (   s   you wini   i(   (   R   R    R   (   R   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt    test_app_iter_range_inner_methodb  s    c          C   s\   t  i }  d  t  _ z9 t  d d g d d  } t | i  t | i d  Wd  |  t  _ Xd  S(   NR#   s   Content-Types	   text/htmlR   R   (   s   Content-Types	   text/html(   R   t   default_content_typeR)   R   t   _headerlistR    R   (   R   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_content_type_in_headerlisti  s    			c          C   s8   t  d  }  t i t t |     } t |  |  d  S(   Nt   test(   R   RP   RQ   R   t   strt
   equal_resp(   R-   t   inp(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_from_filew  s    c          C   sM   t  d t d d g  d d  }  t i t t |     } t |  |  d  S(   NR   s   test R   R   s
   text/plain(   R   R+   RP   RQ   R   R   R   (   R-   R   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_from_file2|  s    	c          C   s   t  d  }  t i t t |   d   } t |  |  t  d t d d g  d d  }  t i t t |   d   } t |  |  d  S(   NR   s   utf-8R   s   test R   R   s
   text/plain(   R   RP   t   StringIOR   R   R   R+   (   R-   R   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_from_text_file  s    	c         C   s9   t  i |  } t |  i | i  t |  i | i  d  S(   N(   R   t	   from_fileR    R   R"   (   R-   R   RL   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyR     s    c          C   s>   t    }  t i d  } t  i |  } t |  i | i  d  S(   Ns.   200 OK
	Content-Type: text/html; charset=UTF-8(   R   RP   RQ   R   R    R"   (   t   res1t   file_w_spaceRL   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt(   test_from_file_w_leading_space_in_header  s
    		c          C   s&   t  i d  }  t t t i |   d  S(   Ns   200 OK
Bad Header(   RP   RQ   R   t
   ValueErrorR   R   (   t	   file_w_bh(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_file_bad_header  s    c          C   sB   t    }  d |  _ t |  i d  t t t |  d t d   d  S(   NR0   s   200 OKR   i   (   R   R   R    R   R*   t   setattrt   float(   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_set_status  s    		c          C   sb   t    }  d |  _ t |  i d g  h d d 6|  _ t |  i d g  |  ` t |  i g   d  S(   Ns   Content-Types   text/html; charset=UTF-8(   s   Content-Types   text/html; charset=UTF-8(   (   s   Content-Types   text/html; charset=UTF-8(   s   Content-Types   text/html; charset=UTF-8(   s   Content-Types   text/html; charset=UTF-8(   R   R#   R    (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_set_headerlist  s    		c          C   s;   d d k  l }  h d d 6d d 6} t |  |  d  d  S(   Ni(   t   _request_urit   https   wsgi.url_schemes   test.comt	   HTTP_HOSTs   http://test.com/(   t   webob.responseR   R    (   R   R	   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_request_uri_no_script_name  s
    
c          C   sI   d d k  l }  h d d 6d d 6d d 6d	 d
 6} t |  |  d  d  S(   Ni(   R   t   httpss   wsgi.url_schemes   test.comt   SERVER_NAMEt   443t   SERVER_PORTs   /foobart   SCRIPT_NAMEs   https://test.com/foobar(   R   R   R    (   R   R	   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_request_uri_https  s    
c          C   sE   d d k  l }  |  t g   d d d d } t t |  g   d  S(   Ni(   t   AppIterRangeRp   i   Rq   (   R   R   R+   R    RW   (   R   RZ   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt)   test_app_iter_range_starts_after_iter_end  s    c          C   sP   t  d d  }  t |  i d   |  i d  t |  i d  t |  i d  d  S(   NR   R   t   bt   ct   abci   (   R   R   (   R   R    Rn   R)   t   writeR   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt!   test_resp_write_app_iter_non_list  s
    c          C   s   d d k  l }  t d d g  } |  |  } | i d d g  t | i d d d g  | i   t | i d d d g  d  S(   Ni(   t   ResponseBodyFileR   R   R]   t   baz(   R   R   R   t
   writelinesR    R   t   flush(   R   R-   t   rbo(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt"   test_response_file_body_writelines  s    
c          C   s#   t    }  t t |  i t    d  S(   N(   R   R   R*   R   t   object(   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_response_write_non_str  s    	c          C   s3   t  d  }  |  i d  t |  i d d g  d  S(   NR   R   (   R   R   R    R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt,   test_response_file_body_write_empty_app_iter  s    c          C   s3   t  d  }  |  i d  t |  i d d g  d  S(   NR   R   (   R   R   R    R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt(   test_response_file_body_write_empty_body  s    c          C   s    t    i }  t t |  i  d  S(   N(   R   t	   body_fileR   t   NotImplementedErrort   close(   R   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt-   test_response_file_body_close_not_implemented  s    c          C   s,   t    i }  d |  _ t t |   d  d  S(   Nt   yos   <body_file for 'yo'>(   R   R   t   responseR    t   repr(   R   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_response_file_body_repr  s    	c          C   sK   t    }  d  |  _ t t t  d t d g  d d t t |  i d  d  S(   NR   R   R   R   (   R   R)   t	   _app_iterR   R*   R+   t   AttributeErrort   __getattribute__(   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_body_get_is_none  s
    		c          C   s/   t  d t d  f  }  t t |  i d  d  S(   NR   R   R   (   R   R   R   R*   R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt$   test_body_get_is_unicode_notverylong  s    c          C   s:   t  d d g d t d  g  }  t t |  i d  d  S(   NR   R   i3   R   (   R   R   R   R*   R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_body_get_is_unicode  s    #c          C   s&   t    }  t t |  i d t    d  S(   NR   (   R   R   R*   t   __setattr__R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt    test_body_set_not_unicode_or_str  s    	c          C   s)   t    }  t t |  i d t d   d  S(   NR   R   (   R   R   R*   R   R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_body_set_unicode  s    	c          C   s0   t  d  }  t |  i d  t |  i d  d  S(   NR   i   (   R   R    R   Rn   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt%   test_body_set_under_body_doesnt_exist  s    c          C   s6   t  d  }  |  ` t |  i d  t |  i d  d  S(   Nt   123R   i    (   R   R   R    Rn   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_body_del  s    c          C   s&   t  d d   }  t t |  i d  d  S(   NR   t   text(   R   R)   R   R   R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_text_get_no_charset  s    c          C   ss   t    }  d |  _ d } t | d  } | |  _ t |  i |  | |  _ t |  i |  |  ` t |  i d  d  S(   Ns   utf-8s   La PeñaR   (   R   R   R   R   R    t   unicode_bodyt   ubody(   R-   t   bbodyR   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_unicode_body  s    				c          C   s8   t    }  d |  _ d |  _ t |  i t d d   d  S(   Ns   utf-8s   La Peña(   R   R   R   R    R   R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_text_get_decode  s    			c          C   s,   t    }  d  |  _ t t |  i d d  d  S(   NR   R   (   R   R)   R   R   R   R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_text_set_no_charset#  s    		c          C   s,   t    }  d |  _ t t |  i d d  d  S(   Ns   utf-8R   s   La Peña(   R   R   R   R*   R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_text_set_not_unicode(  s    		c          C   s6   t  d  }  |  ` t |  i d  t |  i d  d  S(   NR   R   i    (   R   R   R    R   Rn   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_text_del.  s    c          C   s_   t    }  d |  _ t |  i d  t |  i d g  |  ` t |  i d  t |  i d  d  S(   NR   i   R   i    (   R   R   R    Rn   R   R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_body_file_del4  s    		c          C   sK   t    }  t d d  |  _ |  i t d   t |  i t d d   d  S(   Ns   La Peñas   utf-8R   s	   La Peñaa(   R   R   R   R   R    (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_write_unicode=  s    	c          C   s,   t  d d   }  t t |  i t d   d  S(   NR   R   (   R   R)   R   R*   R   R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_write_unicode_no_charsetC  s    c          C   s9   t    }  d |  _ |  i t d   t |  i d  d  S(   NR   R   t   abca(   R   R   R   R   R    R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_write_textG  s    		c          C   sB   t  d d d d g  }  |  ` t |  i d  t |  i d   d  S(   NRn   i   R   R   R   (   R   R   R    R   Rn   R)   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_app_iter_delM  s    c          C   s6   t    }  |  i i d d   t t |  i d d  d  S(   Ns   Content-TypeR   s   utf-8(   R   R"   t   popR)   R   R   R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt'   test_charset_set_no_content_type_headerV  s    	c          C   s3   t    }  |  i i d d   t |  i   d   d  S(   Ns   Content-Type(   R   R"   R   R)   R    t   _charset__del(   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt'   test_charset_del_no_content_type_header[  s    	c          C   s*   t    }  d |  i d <t |  i h   d  S(   NR   s   Content-Type(   R   R"   R    t   content_type_params(   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt@   test_content_type_params_get_no_semicolon_in_content_type_header`  s    	c          C   s1   t    }  d |  i d <t |  i h d d 6 d  S(   Ns   foo;encoding=utf-8s   Content-Types   utf-8t   encoding(   R   R"   R    R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt=   test_content_type_params_get_semicolon_in_content_type_headere  s    	c          C   s7   t    }  d |  i d <d  |  _ t |  i d d  d  S(   Ns   foo;bars   Content-TypeR   (   R   R"   R)   R   R    (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt-   test_content_type_params_set_value_dict_emptyj  s    		c          C   s1   t    }  h d d 6|  _ t |  i d d  d  S(   NR   R   s   Content-Types   text/html; a=""(   R   R   R    R"   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt-   test_content_type_params_set_ok_param_quotingp  s    	c          C   sG   t    }  |  i d d  |  i d d d t t |  i d d  d  S(	   NR   t   1t   2t	   overwriteis
   Set-Cookies   a=2; Path=/(   s
   Set-Cookies   a=2; Path=/(   R   R$   RA   R    R#   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_set_cookie_overwriteu  s    	c          C   s   t    }  |  i d d   t |  i d d d  g  } |  i d d i d  D] } | | i   qP ~ } t |  d j p t  | i	   t | d d  t | d d	  t | d
 d  | d i
 d  p t  d  S(   NR   ii    s
   Set-Cookiei   R   i   s	   Max-Age=0s   Path=/i   s   a=i   t   expires(   R   R$   R)   R    R#   t   splitR%   t   lenR   t   sortt
   startswith(   R-   t   _[1]R   t   val(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_set_cookie_value_is_None{  s    	;
c          C   s   t    }  |  i d d d d t |  i d d d  g  } |  i d d i d	  D] } | | i   qV ~ } t |  d
 j p t  | i   t | d d  t | d d  t | d d  | d i	 d  p t  d  S(   NR   R   t   max_ageid   ii    s
   Set-Cookiei   R   i   s   Max-Age=100s   Path=/i   s   a=1i   R  (
   R   R$   R    R#   R  R%   R  R   R  R  (   R-   R  R   R	  (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt2   test_set_cookie_expires_is_None_and_max_age_is_int  s    	;
c          C   s  d d k  l }  t   } | i d d d |  d d  t | i d d d	  g  } | i d d
 i d  D] } | | i   qo ~ } t |  d j p t	  | i
   t | d d  t | d
 d  t | d d  | d i d  p t	  d  S(   Ni(   Rh   R   R   R  Rk   id   i    s
   Set-Cookiei   R   i   s   Max-Age=100s   Path=/i   s   a=1i   R  (   Rg   Rh   R   R$   R    R#   R  R%   R  R   R  R  (   Rh   R-   R  R   R	  (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt8   test_set_cookie_expires_is_None_and_max_age_is_timedelta  s    	;
c          C   s  d d  k  }  t   } |  i  i   |  i d d  } | i d d d | t | i d d d  g  } | i d d i d	  D] } | | i   q ~ } t	 |  d
 j p t
  | i   t | d d j  t | d d  t | d d  | d i d  p t
  d  S(   Nit   daysi   R   R   R  i    s
   Set-CookieR   i   s   Max-Age=86399s   Max-Age=86400s   Path=/i   s   a=1i   (   s   Max-Age=86399s   Max-Age=86400(   Rg   R   t   utcnowRh   R$   R    R#   R  R%   R  R   R  R   R  (   Rg   R-   t   thenR  R   R	  (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt7   test_set_cookie_expires_is_not_None_and_max_age_is_None  s    	;
c          C   s@   t    }  t d d  } |  i d |  t |  i d d  d  S(   Ns   La Peñas   utf-8R   is
   Set-Cookies   a="La Pe\303\261a"; Path=/(   s
   Set-Cookies   a="La Pe\303\261a"; Path=/(   R   R   R$   R    R#   (   R-   R	  (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt    test_set_cookie_value_is_unicode  s    	c          C   s   t    }  d |  i d <|  i d  t |  i d d d  g  } |  i d d i d  D] } | | i   qZ ~ } t |  d j p t  | i	   t | d d	  t | d d
  t | d d  | d i
 d  p t  d  S(   Ns   a=2; Path=/s
   Set-CookieR   ii    i   R   i   s	   Max-Age=0s   Path=/i   s   a=i   R  (   R   R"   t   delete_cookieR    R#   R  R%   R  R   R  R  (   R-   R  R   R	  (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_delete_cookie  s    	;
c          C   s   t    }  d |  i d <|  i d d d t |  i d d d  g  } |  i d d i d	  D] } | | i   q` ~ } t |  d
 j p t  | i	   t | d d  t | d d  t | d d  | d i
 d  p t  d  S(   Ns   a=2; Path=/s
   Set-CookieR   t   paths   /abcii    i   R   i   s	   Max-Age=0s	   Path=/abci   s   a=i   R  (   R   R"   R  R    R#   R  R%   R  R   R  R  (   R-   R  R   R	  (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_delete_cookie_with_path  s    	;
c          C   s	  t    }  d |  i d <|  i d d d d d t |  i d d	 d  g  } |  i d d
 i d  D] } | | i   qf ~ } t |  d j p t  | i	   t | d	 d  t | d
 d  t | d d  t | d d  | d i
 d  p t  d  S(   Ns   a=2; Path=/s
   Set-CookieR   R  s   /abct   domains   example.comii    i   R   i   s   Domain=example.coms	   Max-Age=0i   s	   Path=/abci   s   a=i   R  (   R   R"   R  R    R#   R  R%   R  R   R  R  (   R-   R  R   R	  (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_delete_cookie_with_domain  s    	;
c          C   s    t    }  |  i d d t d  S(   NR   t   strict(   R   t   unset_cookiet   False(   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt-   test_unset_cookie_not_existing_and_not_strict  s    	c          C   s    t    }  t t |  i d  d  S(   NR   (   R   R   t   KeyErrorR  (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt)   test_unset_cookie_not_existing_and_strict  s    	c          C   s   t    }  |  i i d d  |  i i d d  |  i d  t |  i i d  d g  |  i t d   t |  i i d  g   d  S(   Ns
   Set-Cookies   a=2; Path=/s   b=3; Path=/R   R   (   R   R"   t   addR  R    R;   R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt    test_unset_cookie_key_in_cookies  s    	c          C   s)   t    }  |  i d  } t | d  d  S(   NR   (   R   R<   R    (   R-   RX   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt    test_merge_cookies_no_set_cookie  s    	c          C   sQ   t    }  t    } | i d d  | i |   } t | i i d  d g  d  S(   NR   R   s
   Set-Cookies   a=1; Path=/(   R   R$   R<   R    R"   R;   (   t	   inner_resR-   RX   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt#   test_merge_cookies_resp_is_Response  s
    		c             s   g      f d   }  t    } | i d d  | i |   } h  } d  d  } | | |  } | d j p t  t    d j p t    d d d g   d  S(	   Nc            s     i  |  | f  d S(   NR   (   t   append(   R	   R
   (   t   L(    s2   /home/chrism/projects/webob/tests/test_response.pyt   dummy_wsgi_callable  s    R   R   c         S   s   t  | d g  d  S(   Ns
   Set-Cookies   a=1; Path=/(   s
   Set-Cookies   a=1; Path=/(   R    (   R   R"   t   exc_info(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   dummy_start_response  s    R   i   i    s   200 OK(   R   R$   R<   R)   R   R  (   R&  R-   t   wsgiappR	   R(  RX   (    (   R%  s2   /home/chrism/projects/webob/tests/test_response.pyt(   test_merge_cookies_resp_is_wsgi_callable  s    	c          C   s;   t    }  t i   |  _ d  |  _ |  i } t | d  d  S(   NR   (   R   RP   RQ   R   R)   t   _bodyR   R    (   R-   RX   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt/   test_body_get_body_is_None_len_app_iter_is_zero
  s
    			c          C   s6   t    }  t t |  i  d  t |  i i d   d  S(   Ns   <CacheControl ''>(   R   R    R   t   cache_controlR  R)   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_cache_control_get  s    	c          C   sp   t    }  d |  _ t |  i d  t i d  } t | i |   i d  d |  _ t | i |   i d  d  S(   Ns
   /test.htmlR   s   http://localhost/test.htmls   /test2.htmls   http://localhost/test2.html(   R   t   locationR    R   R   R   (   R-   R,   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_location  s    			c          C   sI   d d k  l }  h d d 6d d 6d d 6d	 d
 6} t |  |  d  d  S(   Ni(   R   R   s   wsgi.url_schemes   test.comR   t   80R   s   /foobarR   s   http://test.com/foobar(   R   R   R    (   R   R	   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_request_uri_http  s    
c          C   sB   d d k  l }  h d d 6d d 6d d 6} t |  |  d	  d  S(
   Ni(   R   R   s   wsgi.url_schemes   test.comR   s   /foobart	   PATH_INFOs   http://test.com/foobar(   R   R   R    (   R   R	   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt    test_request_uri_no_script_name2*  s    
c          C   sC   t    }  d |  i _ t t |  i  d  t |  i d d  d  S(   Ni
   s   <CacheControl 'max-age=10'>s   cache-controls
   max-age=10(   R   R-  R  R    R   R"   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt%   test_cache_control_object_max_age_ten6  s    	c          C   s&   t    }  t t t |  i d d  d  S(   Nt	   max_stalei
   (   R   R   R   R   R-  (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt#   test_cache_control_set_object_error<  s    	c          C   s,   t    }  t |  _ t t |  i  d  d  S(   Ns?   <CacheControl 'max-age=0, must-revalidate, no-cache, no-store'>(   R   RA   t   cache_expiresR    R   R-  (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_cache_expires_set@  s    		c          C   s?   t    }  d |  _ t |  i d  d |  _ t |  i d  d  S(   Ni  s   400 Bad Requesti  s   404 Not Found(   R   R    R    t   _statust
   status_int(   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_status_code_setF  s
    			c          C   s3   t    }  h d d 6|  _ t t |  i  d  d  S(   NR   R   s   <CacheControl 'a=b'>(   R   R-  R    R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_cache_control_set_dictM  s    	c          C   s,   t    }  d  |  _ t t |  i  d  d  S(   Ns   <CacheControl ''>(   R   R)   R-  R    R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_cache_control_set_NoneR  s    		c          C   s2   t    }  t d  |  _ t t |  i  d  d  S(   NR   s   <CacheControl 'abc'>(   R   R   R-  R    R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_cache_control_set_unicodeW  s    	c          C   sK   d t  f d     Y}  t   } |    | _ h  | _ t | i i h   d  S(   Nt   DummyCacheControlc           B   s   e  Z d    Z RS(   c         S   s   d |  _  h d d 6|  _ d  S(   Ni   t   bleh(   t   header_valuet
   properties(   R   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   __init__^  s    	(   R   R   RD  (    (    (    s2   /home/chrism/projects/webob/tests/test_response.pyR@  ]  s   (   R   R   t   _cache_control_objR-  R    RC  (   R@  R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt.   test_cache_control_set_control_obj_is_not_None\  s
    		c          C   s)   t    }  |  ` t t |  i  d  d  S(   Ns   <CacheControl ''>(   R   R-  R    R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_cache_control_delf  s    	c          C   s6   t    }  |  i } d d k l } t | i |  d  S(   Ni(   R   (   R   R   R   R   R    t	   __class__(   R-   RX   R   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_body_file_getk  s    		c          C   s#   t  }  t t |  i t d   d  S(   NR   (   R   R   R*   R   R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_body_file_write_no_charsetq  s    c          C   s?   t  d d  }  t   } | i |   t | i d d g  d  S(   Ns   La Peñas   utf-8R   (   R   R   R   R    R   (   t   sR-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt$   test_body_file_write_unicode_encodesu  s    	c          C   s&   t    }  t t |   i d   d  S(   Ns   200 OK>(   R   R   R   t   endswith(   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt	   test_repr{  s    	c          C   sO   t    }  d d k l } | d d  } |  i d |  t |  i i d  d  S(   Ni(   Rh   Rk   i<   (   R   Rg   Rh   R8  R    R-  R  (   R-   Rh   t   delta(    (    s2   /home/chrism/projects/webob/tests/test_response.pyt    test_cache_expires_set_timedelta  s
    	c          C   s0   t    }  |  i d d  t |  i i d  d  S(   NRk   i<   (   R   R8  R    R-  R  (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_cache_expires_set_int  s    	c          C   s6   t    }  |  i d d  d d  t |  i i d  d  S(   NRk   R   i   (   R   R8  R)   R    R-  R   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_cache_expires_set_None  s    	c          C   s|   t    }  |  i d d  t |  i i t  t |  i i d  t |  i i t  t |  i i d  t |  i i	 d  d  S(   NRk   i    t   *(
   R   R8  R    R-  t   no_storeRA   t   no_cachet   must_revalidateR  t
   post_check(   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_cache_expires_set_zero  s    	c          C   s    t    }  t t |  i d  d  S(   Nt   badencoding(   R   R   R   R&   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_encode_content_unknown  s    	c          C   s)   t    }  |  i d  } t | d   d  S(   Nt   identity(   R   R&   R    R)   (   R-   RX   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_encode_content_identity  s    	c          C   s2   t    }  d |  _ |  i d  } t | d   d  S(   NR   (   R   R'   R&   R    R)   (   R-   RX   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt(   test_encode_content_gzip_already_gzipped  s    		c          C   sd   t    }  t i d  |  _ |  i d  } t | d   t |  i d  t |  i d d d g  d  S(   NR   R   i   s
        s   K s   !es   (   R   RP   RQ   R   R&   R    R)   Rn   (   R-   RX   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt'   test_encode_content_gzip_notyet_gzipped  s    		c          C   sp   t    }  t i d  |  _ |  i d d t } t | d   t |  i d   t t	 |  i  d d d g  d  S(   NR   R   t   lazys
        s   K s   !es   (
   R   RP   RQ   R   R&   RA   R    R)   Rn   RW   (   R-   RX   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt,   test_encode_content_gzip_notyet_gzipped_lazy  s    	c          C   sn   t    }  d d } t i |  |  _ |  i d  t |  i  } t d i |   t |  j  p t  d  S(   Nt$   abcdefghijklmnopqrstuvwxyz0123456789i@B R   R   (	   R   RP   RQ   R   R&   RW   R  R!   R   (   R-   t   DATARX   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt(   test_encode_content_gzip_buffer_coverage  s    	
c          C   s/   t    }  d |  _ |  i   } t | d   d  S(   NR[  (   R   R'   R(   R    R)   (   R-   RX   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_decode_content_identity  s    		c          C   s&   t    }  d |  _ t t |  i  d  S(   Nt   weird(   R   R'   R   R   R(   (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_decode_content_weird  s    		c          C   s   d d k  l }  t i   } |  d d d d d |  } | i d  | i   | i   } t   } d	 | _ | | _	 | i
   t | i	 d  d  S(
   Ni(   t   GzipFilet   filenameR   t   modet   wt   fileobjR   R   (   R   Rg  RP   RQ   R   R   t   getvalueR   R'   R   R(   R    (   Rg  t   io_t   gzip_fR   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_decode_content_gzip  s    
			
c          C   sA   t    }  d |  _ d g |  _ |  i h   } t | d g  d  S(   NR   t   Locations   http:(   s   Locations   http:(   s   Locations   http:(   R   R'   R#   t   _abs_headerlistR    (   R-   RX   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt)   test__abs_headerlist_location_with_scheme  s
    		c          C   sO   t    }  d |  _ d	 g |  _ |  i h d d 6d d 6 } t | d
 g  d  S(   NR   Rp  s   /abcR   s   wsgi.url_schemes   example.com:80R   s   http://example.com/abc(   s   Locations   /abc(   s   Locations   http://example.com/abc(   R   R'   R#   Rq  R    (   R-   RX   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt'   test__abs_headerlist_location_no_scheme  s    		c          C   s?   d }  t  i |   } t d |  } | i |  j p t  d  S(   NR   R   (   RP   RQ   R   R   R   (   t   datat   fileR6   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_response_set_body_file1  s    c          C   sC   d d }  t  i |   } t d |  } | i |  j p t  d  S(   Nt   abcdefi   R   (   RP   RQ   R   R   R   (   Rt  Ru  R6   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_response_set_body_file2  s    
c          C   s   t  d h d d 6 }  |  i d j p t t |  i   |  i d j p t  t    }  h d d 6|  _ |  i d j p t  |  ` |  i d j p t  d  S(	   Nt	   json_bodyi   R   s   {"a":1}s   application/jsonR   s	   text/htmlR   (   R   R   R   R   R   Ry  (   R6   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   test_response_json_body  s    #	c          C   s   t    }  |  i d d  |  i d d  t |  i d   t |  i i  t |  i i  t |  i i	  t |  i i
 d  d  S(   NRk   i    i   (   R   R8  R    t   pragmaR)   R   R-  RU  RT  RV  R  (   R-   (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt(   test_cache_expires_set_zero_then_nonzero  s    	(   Rz   RP   t
   nose.toolsR    R   R   t   webob.requestR   R   R   R   t   webob.compatR   R   R   R.   R/   R1   R3   R4   R5   R7   R9   R>   RB   RF   RH   RM   RS   RY   R[   R_   R`   Rf   Rl   Rm   Rs   Rt   Rv   Rw   Rx   R|   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R  R
  R  R  R  R  R  R  R  R  R  R   R!  R#  R*  R,  R.  R0  R2  R4  R5  R7  R9  R<  R=  R>  R?  RF  RG  RI  RJ  RL  RN  RP  RQ  RR  RX  RZ  R\  R]  R^  R`  Rc  Rd  Rf  Ro  Rr  Rs  Rv  Rx  Rz  R|  (    (    (    s2   /home/chrism/projects/webob/tests/test_response.pyt   <module>   s
  		'																														 														
																																																																	
																								
