/usr/lib/python2.6/site-packages/glanceclient/tests/unit
NameSizeModeActions
v1/-0755rm
v2/-0755rm
var/-0755rm
test_base.py22340644editdlrm
test_base.pyc28580644editdlrm
test_client.py17770644editdlrm
test_client.pyc23220644editdlrm
test_exc.py23760644editdlrm
test_exc.pyc23790644editdlrm
test_http.py147740644editdlrm
test_http.pyc158570644editdlrm
test_progressbar.py26060644editdlrm
test_progressbar.pyc23470644editdlrm
test_shell.py289940644editdlrm
test_shell.pyc290470644editdlrm
test_ssl.py99330644editdlrm
test_ssl.pyc102960644editdlrm
test_utils.py73110644editdlrm
test_utils.pyc79560644editdlrm
__init__.py00644editdlrm
__init__.pyc1640644editdlrm
Edit: /usr/lib/python2.6/site-packages/glanceclient/tests/unit/test_http.pyc (15857B)
Ñò tcomm_err((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyttest_connection_timeoutŒs   cCsgd„}d}|ii|i|d|ƒ|itii|iidƒ}|i|i|i ƒdS(s¥ Should receive a CommunicationError if connection refused. And the error should list the host and port that refused the connection cSstiiƒ‚dS(N(RBRCtConnectionError(RERF((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyRGŸss/v1/images/detail?limit=20RHN( R%R1RRIRJRKtCommunicationErrorR RMRN(R RGR>RO((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyttest_connection_refused˜s   cCsxd}d}|ii|i|d|dhdd6ƒhdd6}|ii|d|ƒ\}}|i||iƒdS( Ns/v1/images/detailtOkRHR8s text/plains Content-Typeuniñottest(R%R1RR R/RH(R R>RHR8tresptbody((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyttest_http_encoding«s cCsxt|idƒp|idƒnd}h|d6dd6}|ii|ƒ}|id|dƒ|id|ƒdS(Ntencode_headerss0Cannot do header encoding check on SessionClientuniñoRUsnone-valsniño(R R R R2RYR/R7(R tvalueR8tencoded((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyttest_headers_encodingµscCs„hdd6}d}d}|ii|i|d|d|ƒ|iidd|ƒ\}}|i||iƒ|i||iƒdS(sAVerify the path being used for HTTP requests reflects accurately.s text/plains Content-TypeRTs/v1/images/detailRHR8N(R%R1RR R/R8RH(R R8RHR>RVRW((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyttest_raw_request¿s #c Cshd}ti|ddƒ}|i|ƒ}tidddddd d d d d ƒ}|i||ƒdS( Nshttp://example.com:9292Ruadc123tschemeRtnetlocsexample.com:9292R>ttquerytfragment(RRtparse_endpointRt SplitResultR/(R Rt test_clienttactualtexpected((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyttest_parse_endpointËs cCs2d}ti|ddƒ}|i|idƒdS(Nshttp://example.com:9292Ruadc123gÀ‚@(RRR/ttimeout(R RRe((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyt test_get_connections_kwargs_httpÔscCsœd}ti|ƒ}d}|ii|i|d|ƒhdd6}|ii|d|d|ƒ\}}|i|iiit i ƒ|i ||i ƒdS(NRTs /v1/images/RHuchunked_requestRUR8tdata( R;tStringIOR%tpostRR tassertIsInstanceR:RWttypest GeneratorTypeR/RH(R RHRkR>R8RVRW((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyttest_http_chunked_requestÙs $cCs¼hdd6}d}d}|ii|i|d|ƒhdd6}|ii|d|d|ƒ\}}|i||iƒ|i|iiit i ƒ|i|t i |iiiƒƒdS( Nt json_requestRUs /v1/imagestOKRHuchunked_requestR8Rk( R%RmRR R/RHRnR:RWR;t string_typestjsontloads(R RkR>RHR8RVRW((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyttest_http_jsonäs  $cCsd}d}|ii|i|dti|ƒdhdd6ƒ|ii|ƒ\}}|it|ti ƒƒ|i |gt |ƒƒdS(NtTESTs /v1/images/RWR8sapplication/octet-streams Content-Type( R%R1RR;RlR R0t isinstanceRoRpR/tlist(R RkR>RVRW((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyttest_http_chunked_responseñs%cCsvyId}hdd6dd6}ti|ti|ƒƒ}|ii|ƒWn&tj o}|id|ƒnXdS(NRTs text/plains Content-Typesvalue1¥¦RUs,Unexpected UnicodeDecodeError exception '%s'(Rt FakeResponseR;RlR tlog_http_responsetUnicodeDecodeErrortfail(R tresponseR8tfakete((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyt*test_log_http_response_with_non_ascii_charûs  c Cs`y3hdd6}d}|iidd||dƒWn&tj o}|id|ƒnXdS(Nsvalue1¥¦theader1s examplebody¥¦tGETs /api/v1/¥s,Unexpected UnicodeDecodeError exception '%s'(R RR2R~R(R R8RWR‚((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyt)test_log_curl_request_with_non_ascii_chars  s"glanceclient.common.http.LOG.debugcCsÑd}d}h||6}d}|iidd||dƒ|i|idƒ|i|iddƒd ||f}|i|iddti|ƒd ƒd |}|i|iddti|ƒd ƒdS( NR„tvalue1t examplebodyR…s/api/v1/sLOG.debug never calledis"LOG.debug called with no argumentss.*\s-H\s+'\s*%s\s*:\s*%s\s*'.*s header not found in curl commands.*\s-d\s+'%s'\s.*sbody not found in curl command( R RR2R0tcalledt call_argst assertThatRt MatchesRegex(R tmock_logthd_namethd_valR8RWthd_regext body_regex((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyt*test_log_curl_request_with_body_and_headers     c Cs@hdd6}ti|id|d|d|ddƒ}|idd |ddƒ|i|id ƒ|i|id d ƒh|d 6|d6|d6}x¤ti |ƒD]“\}} | oBd|| | f} |i |id d t i | ƒd|ƒq¥d|} |i |id d t i t i | ƒƒd|ƒq¥WdS(NR‡R„tkey_filet cert_filetcacertRs fake-tokenR…s/api/v1/sLOG.debug never calledis"LOG.debug called with no argumentstkeytcerts.*\s--%s\s+('%s'|%s).*sno --%s option in curl commands .*\s--%s\s+.*s&unexpected --%s option in curl command(RRR&RR2R0R‰RŠR;R<R‹RRŒtNot( R RR–R—R•R8R3tneedlestoptionRZtregex((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyt!_test_log_curl_request_with_certs$s,      cCs|i|dddƒdS(Ntkey1tcert1tcacert2(Rœ(R R((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyt$test_log_curl_request_with_all_certs=scCs|i|dddƒdS(NRRž(RœR2(R R((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyt%test_log_curl_request_with_some_certsBscCs™hdd6}ti|idtddƒ}|idd|ddƒ|i|idƒ|i|id d ƒ|i |id d t i d ƒd ƒdS( NR‡R„tinsecureRs fake-tokenR…s/api/v1/sLOG.debug never calledis"LOG.debug called with no argumentss .*\s-k\s.*sno -k option in curl command( RRR&tTrueRR2R0R‰RŠR‹RRŒ(R RR8R3((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyt)test_log_curl_request_with_insecure_paramFs   cCs¬d}h|d6}ti|id|ƒ}|idd|ddƒ|i|idƒ|i|iddƒd |}|i|iddt i t i |ƒƒd ƒdS( Ns fake-tokens X-Auth-TokenR.R…s/api/v1/sLOG.debug never calledis"LOG.debug called with no argumentss.*%s.*s"token found in LOG.debug parameter( RRRRR2R0R‰RŠR‹RR˜RŒ(R Rt fake_tokenR8R3t token_regex((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyt'test_log_curl_request_with_token_headerTs   (t__name__t __module__t scenariosRRR"R4R5R9RARPRSRXR\R]RhRjRqRwR{RRƒR†R%tpatchR’RœR R¡R¤R§(((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyR,s8            (RRutkeystoneclient.authRtkeystoneclientRR%RBtrequests_mock.contribRR;tsix.moves.urllibRt testscenariosRt load_testst testtoolsRRoRJtglanceclient.commonRtglanceclient.testsRRtTestCaseR(((sN/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/tests/unit/test_http.pyts"