Your IP : 216.73.216.249
�
@u`Wc @ sG d d l Z d d l Z d d l Z d d l m Z d i d � Z d S( i����Ni ( t recorderc s � � � � f d � } | S( sm Provide a Betamax-wrapped Session for convenience.
.. versionadded:: 0.5.0
This decorator can be used to get a plain Session that has been wrapped in
Betamax. For example,
.. code-block:: python
from betamax.decorator import use_cassette
@use_cassette('example-decorator', cassette_library_dir='.')
def test_get(session):
# do things with session
:param str cassette_name:
Name of the cassette file in which interactions will be stored.
:param str cassette_library_dir:
Directory in which cassette files will be stored.
:param dict default_cassette_options:
Dictionary of default cassette options to set for the cassette used
when recording these interactions.
:param \*\*use_cassette_kwargs:
Keyword arguments passed to :meth:`~betamax.Betamax.use_cassette`
c s. t j � � � � � � � f d � � } | S( Nc s� t j � } t j d | d � d � � } | r} | d | d } } t | t j � rj | | f | } q� | | f | } n | f } | j � � � � � | | � Wd QXd S( Nt sessiont cassette_library_dirt default_cassette_optionsi i ( t requestst SessionR t Betamaxt
isinstancet unittestt TestCaset use_cassette( t argst kwargsR t recrt fst( R t
cassette_nameR t funct use_cassette_kwargs( sB /opt/alt/python27/lib/python2.7/site-packages/betamax/decorator.pyt test_wrapper% s ( t functoolst wraps( R R ( R R R R ( R sB /opt/alt/python27/lib/python2.7/site-packages/betamax/decorator.pyt actual_decorator$ s *( ( R R R R R ( ( R R R R sB /opt/alt/python27/lib/python2.7/site-packages/betamax/decorator.pyR
s ( R R R t R t NoneR
( ( ( sB /opt/alt/python27/lib/python2.7/site-packages/betamax/decorator.pyt <module> s