Your IP : 216.73.216.249


Current Path : /proc/thread-self/root/opt/alt/python27/lib/python2.7/site-packages/betamax/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python27/lib/python2.7/site-packages/betamax/decorator.pyc

�
@u`Wc@sGddlZddlZddlZddlmZdid�ZdS(i����Ni(trecordercs����fd�}|S(smProvide 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`
    cs.tj�������fd��}|S(Ncs�tj�}tjd|d�d��}|r}|d|d}}t|tj�rj||f|}q�||f|}n	|f}|j�����||�WdQXdS(Ntsessiontcassette_library_dirtdefault_cassette_optionsii(trequeststSessionRtBetamaxt
isinstancetunittesttTestCasetuse_cassette(targstkwargsRtrecrtfst(Rt
cassette_nameRtfunctuse_cassette_kwargs(sB/opt/alt/python27/lib/python2.7/site-packages/betamax/decorator.pyttest_wrapper%s			(t	functoolstwraps(RR(RRRR(RsB/opt/alt/python27/lib/python2.7/site-packages/betamax/decorator.pytactual_decorator$s*((RRRRR((RRRRsB/opt/alt/python27/lib/python2.7/site-packages/betamax/decorator.pyR
	s(RRRtRtNoneR
(((sB/opt/alt/python27/lib/python2.7/site-packages/betamax/decorator.pyt<module>s