/usr/lib/python2.6/site-packages/novaclient/openstack/common/apiclient
NameSizeModeActions
auth.py74650644editdlrm
auth.pyc86430644editdlrm
base.py175130644editdlrm
base.pyc210020644editdlrm
client.py138820644editdlrm
client.pyc138020644editdlrm
exceptions.py129990644editdlrm
exceptions.pyc205680644editdlrm
fake_client.py64180644editdlrm
fake_client.pyc62260644editdlrm
utils.py34120644editdlrm
utils.pyc21430644editdlrm
__init__.py00644editdlrm
__init__.pyc1760644editdlrm
Edit: /usr/lib/python2.6/site-packages/novaclient/openstack/common/apiclient/fake_client.pyc (6226B)
Ñò =vVc@sdZddkZddkZddkZddklZddklZddd„Z dei fd„ƒYZ dei fd „ƒYZ dS( s A fake server that "responds" to API methods with pre-canned responses. All of these responses come from the spec, so if for some reason the spec's wrong the tests might raise AssertionError. I've indicated in comments the places where actual behavior differs from the spec. iÿÿÿÿN(tparse(tclientcCs˜|pg}|pg}xw|D]o}y||jpt‚Wq!tj oBt|iƒƒit||ƒƒ}tdt|ƒƒ‚q!Xq!WdS(Nsfound unexpected keys: %s(tAssertionErrortsettkeyst differencetlist(tdcttrequiredtoptionaltkt extra_keys((s\/tmp/pip-build-cD3xZi/python-novaclient/novaclient/openstack/common/apiclient/fake_client.pytassert_has_keys1s  %t TestResponsecBs eZdZd„Zd„ZRS(sDWrap requests.Response and provide a convenient initialization. cCstt|ƒiƒt|_t|tƒoÈ|iddƒ|_|iddƒ}t|tt fƒo#t i |ƒ|_ hdd6}n||_ h}t io2t|i t iƒo|i iddƒ|_ n|id ƒp||_n ||_dS( Nt status_codeiÈttexttsapplication/jsons Content-Typesutf-8tstricttheaders(tsuperR t__init__tTruet_content_consumedt isinstancetdicttgetRRtjsontdumpst_contenttsixtPY3t string_typestencodeR(tselftdataRtdefault_headers((s\/tmp/pip-build-cD3xZi/python-novaclient/novaclient/openstack/common/apiclient/fake_client.pyRAs   cCs6|i|ijo#|i|ijo|i|ijS(N(RRR(R!tother((s\/tmp/pip-build-cD3xZi/python-novaclient/novaclient/openstack/common/apiclient/fake_client.pyt__eq__Vs(t__name__t __module__t__doc__RR%(((s\/tmp/pip-build-cD3xZi/python-novaclient/novaclient/openstack/common/apiclient/fake_client.pyR =s tFakeHTTPClientcBsGeZd„Zddd„Zdd„Zd„Zd„Zd„ZRS(cOsag|_|iddƒph|_| od|jo d}ntt|ƒi||ŽdS(Ntfixturest auth_plugin(N(t callstacktpoptNoneR*RR)R(R!targstkwargs((s\/tmp/pip-build-cD3xZi/python-novaclient/novaclient/openstack/common/apiclient/fake_client.pyR^s   iÿÿÿÿcCs©||f}|i|dd!}|iptd|‚||jptd||‚|dj oA|i|d|jo%td|i|d|fƒ‚q¥ndS(s3Assert than an API method was just called. iis&Expected %s %s but no calls were made.sExpected %s %s; got %s %sis%r != %rN(R,RR.(R!tmethodturltbodytpostexpectedtcalled((s\/tmp/pip-build-cD3xZi/python-novaclient/novaclient/openstack/common/apiclient/fake_client.pyt assert_calledes     cCsË||f}|iptd|‚t}d}x0|iD]%}||dd!jo t}Pq:q:W|ptd|||if‚|dj o-|d|jptd|d|f‚ng|_dS(sBAssert than an API method was called anytime in the test. s&Expected %s %s but no calls were made.iisExpected %s %s; got %sis%s != %sN(R,RtFalseR.R(R!R1R2R3R5tfoundtentry((s\/tmp/pip-build-cD3xZi/python-novaclient/novaclient/openstack/common/apiclient/fake_client.pytassert_called_anytimeus       -cCs g|_dS(N(R,(R!((s\/tmp/pip-build-cD3xZi/python-novaclient/novaclient/openstack/common/apiclient/fake_client.pytclear_callstack‹scCsdS(N((R!((s\/tmp/pip-build-cD3xZi/python-novaclient/novaclient/openstack/common/apiclient/fake_client.pyt authenticateŽsc Ksî|djod|jpt‚n|ii|||idƒph|idƒp |idƒfƒy|i||}Wntj on"Xth|dd6|dd6ƒStiti |ƒd ƒ}|i |ƒ|i d dƒd}|i d ƒi d d ƒi d d ƒ}|i dd ƒ}d|iƒ|f}t||ƒptd|||fƒ‚nt||ƒ|} t| ƒdjo| \} } } n| \} } h} | idƒ|_th| d6| d6| d6ƒS(NtGETtDELETERRR"iiRit?t/t_t.t-s%s_%ss@Called unknown API method: %s %s, expected fakes method name: %sisx-openstack-request-idR(sGETsDELETE(RR,tappendRR*tKeyErrorR Rt parse_qslturlparsetupdatetrsplittstriptreplacetlowerthasattrtgetattrtlentlast_request_id( R!RR1R2R0tfixtureR/t munged_urltcallbacktresptstatusRR3((s\/tmp/pip-build-cD3xZi/python-novaclient/novaclient/openstack/common/apiclient/fake_client.pytclient_request‘s@  # ' N( R&R'RR.R7R;R<R=RW(((s\/tmp/pip-build-cD3xZi/python-novaclient/novaclient/openstack/common/apiclient/fake_client.pyR)\s     (R(RtrequestsRtsix.moves.urllibRt%novaclient.openstack.common.apiclientRR.R tResponseR t HTTPClientR)(((s\/tmp/pip-build-cD3xZi/python-novaclient/novaclient/openstack/common/apiclient/fake_client.pyts