Ńň
tSc           @   s9   d  d k  Z  d  d k l Z d e  i f d     YZ d S(   i˙˙˙˙N(   t   Responset   Test_warn_deprecationc           B   sS   e  Z d    Z d   Z d   Z d d  Z d   Z d   Z d   Z d   Z	 RS(	   c         C   s1   d d  k  } | i |  _ |  i | _ g  |  _  d  S(   Ni˙˙˙˙(   t   warningst   warnt   oldwarnt   _warn(   t   selfR   (    (    s.   /home/chrism/projects/webob/tests/test_util.pyt   setUp   s    c         C   s"   d d  k  } |  i | _ |  `  d  S(   Ni˙˙˙˙(   R   R   R   (   R   R   (    (    s.   /home/chrism/projects/webob/tests/test_util.pyt   tearDown   s    c         C   s    d d k  l } | | | |  S(   Ni˙˙˙˙(   t   warn_deprecation(   t
   webob.utilR	   (   R   t   textt   versiont
   stacklevelR	   (    (    s.   /home/chrism/projects/webob/tests/test_util.pyt   _callFUT   s    i   c         C   s   |  i  i t    d  S(   N(   R   t   appendt   locals(   R   R   t   typeR   (    (    s.   /home/chrism/projects/webob/tests/test_util.pyR      s    c         C   su   t    } | i i d	 d
 g  |  i t |  i  d  |  i d } |  i | d t  d | d j p t  d  S(   Ns
   Set-Cookies   a=bs   x=yi   i    R   s   Consider using .extend()R   (   s
   Set-Cookies   a=b(   s
   Set-Cookies   x=y(   R    t   headerst   updatet   assertEqualt   lenR   t   UserWarningt   AssertionError(   R   t   rt   deprecation_warning(    (    s.   /home/chrism/projects/webob/tests/test_util.pyt   test_multidict_update_warning   s    		
c         C   s9   t    } | i i d g  |  i t |  i  d  d  S(   Ns
   Set-Cookies   a=bi    (   s
   Set-Cookies   a=b(   R    R   R   R   R   R   (   R   R   (    (    s.   /home/chrism/projects/webob/tests/test_util.pyt)   test_multidict_update_warning_unnecessary#   s    	c         C   s7   d } d d k  l } |  i t | d | d  d  d  S(   Ns   1.3.0i˙˙˙˙(   R	   t   fooi   i   (   R
   R	   t   assertRaisest   DeprecationWarning(   R   t   vR	   (    (    s.   /home/chrism/projects/webob/tests/test_util.pyt   test_warn_deprecation)   s    c         C   sG   d } d d k  l } | d | d  d  |  i t |  i  d  d  S(   Ns   9.9.9i˙˙˙˙(   R	   R   i   i   (   R
   R	   R   R   R   (   R   R   R	   (    (    s.   /home/chrism/projects/webob/tests/test_util.pyt$   test_warn_deprecation_future_version.   s    (
   t   __name__t
   __module__R   R   R   R   R   R   R    R!   (    (    (    s.   /home/chrism/projects/webob/tests/test_util.pyR      s   						(   t   unittestt   webob.responseR    t   TestCaseR   (    (    (    s.   /home/chrism/projects/webob/tests/test_util.pyt   <module>   s   