/usr/lib/python2.6/site-packages/cinderclient/tests/unit
Edit: /usr/lib/python2.6/site-packages/cinderclient/tests/unit/utils.pyc (3876B)
Ńņ
=vVc
@ s¤ d d k Z d d k Z d d k Z d d k Z d d k l Z d d k Z d d k Z d e i f d YZ d e f d YZ
d e i f d YZ d S( i’’’’N( t fixturet TestCasec B s e Z h e d 6Z d Z RS( t verifyc C sė t t | i t i i d d j p t i i d d j o8 | i t i d i } | i t i
d | n t i i d d j p t i i d d j o8 | i t i d i } | i t i
d | n d S( Nt OS_STDOUT_CAPTUREt Truet 1t stdouts
sys.stdoutt OS_STDERR_CAPTUREt stderrs
sys.stderr( t superR t setUpt ost environt gett
useFixturet fixturest StringStreamt streamt MonkeyPatch( t selfR R ( ( sJ /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/utils.pyR
s ( t __name__t
__module__R t TEST_REQUEST_BASER
( ( ( sJ /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/utils.pyR s
t FixturedTestCasec B s) e Z d Z d Z d Z d d Z RS( c C sĄ t t | i | i t i | _ d | _ d | _ d | _
| i o: | i | i } | i | | _ | i i | _
n | i
o( | i
| i } | i | | _ n d S( N( R R R
R t requests_mock_fixturet Fixturet requestst Nonet data_fixturet client_fixturet cst client_fixture_classt
new_clientt data_fixture_class( R t fix( ( sJ /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/utils.pyR
. s
c C s¬ | i | i i i | | i | i i i | | oo | i i i } t | t i o | i d } n t | t i
p t i | } n | i | | n d S( Ns utf-8(
t assertEqualR t last_requestt methodt path_urlt bodyt
isinstancet sixt binary_typet decodet string_typest jsont loads( R R% t pathR' t req_data( ( sJ /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/utils.pyt
assert_called? s N( R R R R R! R
R1 ( ( ( sJ /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/utils.pyR ) s t TestResponsec B s/ e Z d Z d Z d Z e d Z RS( sh Class used to wrap requests.Response and provide some
convenience to initialize with a dict.
c C s d | _ t t | t | t oX | i d d | _ | i d d | _ | i d d | _ | i d d | _ n
| | _ d S( Nt status_codet headerst reasont t text(
R t _textR R2 R( t dictR
R3 R4 R5 ( R t data( ( sJ /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/utils.pyt __init__R s
c C s | i | i j S( N( t __dict__( R t other( ( sJ /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/utils.pyt __eq__^ s c C s | i S( N( R8 ( R ( ( sJ /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/utils.pyR7 a s ( R R t __doc__R; R> t propertyR7 ( ( ( sJ /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/utils.pyR2 M s (
R- R R R t requests_mock.contribR R R) t testtoolsR R t ResponseR2 ( ( ( sJ /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/utils.pyt
s $