/usr/lib/python2.6/site-packages/cinderclient/tests/unit
NameSizeModeActions
fixture_data/-0755rm
v1/-0755rm
v2/-0755rm
fakes.py39070644editdlrm
fakes.pyc37840644editdlrm
test_auth_plugins.py143480644editdlrm
test_auth_plugins.pyc197510644editdlrm
test_base.py21850644editdlrm
test_base.pyc25090644editdlrm
test_client.py66440644editdlrm
test_client.pyc58010644editdlrm
test_exceptions.py11790644editdlrm
test_exceptions.pyc11430644editdlrm
test_http.py89600644editdlrm
test_http.pyc123280644editdlrm
test_service_catalog.py104810644editdlrm
test_service_catalog.pyc47790644editdlrm
test_shell.py87990644editdlrm
test_shell.pyc104070644editdlrm
test_utils.py67820644editdlrm
test_utils.pyc106990644editdlrm
utils.py34270644editdlrm
utils.pyc38760644editdlrm
__init__.py00644editdlrm
__init__.pyc1640644editdlrm
Edit: /usr/lib/python2.6/site-packages/cinderclient/tests/unit/test_shell.pyc (10407B)
Ñò =vVc@sEddkZddkZddkZddkZddkZddkZddkZddkZddkl Z ddk l Z ddk l Z ddk lZddk lZddklZddklZdd klZdd klZddki Zdd klZd eifd „ƒYZdeifd„ƒYZdS(iÿÿÿÿN(tmoves(tmatchers(t exceptions(t auth_plugin(tshell(tmock_http_request(trequested_headers(tkeystone_client(tutils(tDiscoveryFailuret ShellTestcBs#eZhdd6dd6dd6dd6Zddd„Zd „Zd „Zd „Zd „Zd „Z d„Z e i ƒd„ƒZ eiddeiƒƒeiddeiƒƒeiddeiƒeidddƒd„ƒƒƒƒZeiiedƒeiiedƒd„ƒƒZRS(tusernamet OS_USERNAMEtpasswordt OS_PASSWORDt tenant_nametOS_TENANT_NAMEshttp://no.where/v2.0t OS_AUTH_URLcsVt‡fd†|iiƒDƒƒ}|i|phƒ|itid|ƒƒdS(Nc3s6x/|](\}}|ˆjo||fVqqWdS(N((t.0tktv(texclude(sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pys 0s s os.environ(tdicttFAKE_ENVtitemstupdatet useFixturetfixturest MonkeyPatch(tselfRtincludetenv((RsO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pytmake_env/s%cCsKtt|ƒiƒx1|iD]&}|iti||i|ƒƒqWdS(N(tsuperR tsetUpRRRtEnvironmentVariable(Rtvar((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyR"4s  c Csªti}zty2tiƒt_tiƒ}|i|iƒƒWn;tj o/ti ƒ\}}}|i d|i ƒnXWdtii ƒ}tii ƒ|t_X|S(Ni(tsyststdoutRtStringIORtOpenStackCinderShelltmaintsplitt SystemExittexc_infot assertEqualtcodetgetvaluetclose(Rtargstrtorigt_shelltexc_typet exc_valuet exc_tracebacktout((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyR:s    cCs|iti|idƒdS(Ns help foofoo(t assertRaisesRt CommandErrorR(R((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyttest_help_unknown_commandJscCsYdddg}|idƒ}x4|D],}|i|ti|titiBƒƒq%WdS(Ns .*?^usage: s%.*?(?m)^\s+create\s+Creates a volume.s>.*?(?m)^Run "cinder help SUBCOMMAND" for help on a subcommand.thelp(Rt assertThatRt MatchesRegextretDOTALLt MULTILINE(Rtrequiredt help_texttr((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyt test_helpMs  cCsVddg}|idƒ}x4|D],}|i|ti|titiBƒƒq"WdS(Ns.*?^usage: cinder lists.*?(?m)^Lists all volumes.s help list(RR<RR=R>R?R@(RRARBRC((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyttest_help_on_subcommandXs  cCs|id|dtiƒdS(NtGETttext(t register_uriRtkeystone_request_callback(Rtmockerturl((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pytregister_keystone_auth_fixturebscCsêtiƒ}d}|i||ƒ|it|idd|ƒd}|i||ƒ|idd|ƒ\}}|i||dƒ|i|dƒd}|i||ƒ|idd|ƒ\}}|i||dƒ|i|dƒdS( Ns7https://WrongDiscoveryResponse.discovery.com:35357/v2.0tauth_urls6https://DiscoveryNotSupported.discovery.com:35357/v2.0sExpected v2 urlsExpected no v3 urls6https://DiscoveryNotSupported.discovery.com:35357/v3.0sExpected v3 urlsExpected no v2 url( RR(RLR8R t_discover_auth_versionstNoneR-t assertIsNone(RRJR3t os_auth_urltv2_urltv3_url((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyttest_version_discoveryfs"  s(keystoneclient.adapter.Adapter.get_tokent side_effects keystoneclient.discover.Discovers sys.stdinsgetpass.getpasst return_valuecCsI|iddƒtiƒ}|iti|idgƒ|idƒdS(NRRtlists OS Password: (R RR(R8tks_exctConnectionRefusedR)tassert_called_with(Rt mock_getpasst mock_stdint mock_discovert mock_tokenR3((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyttest_password_prompted}s trequesttiter_entry_pointsc sd‰dtif‡fd†ƒY‰dtif‡fd†ƒY‰‡fd†|_tƒ|_|iddd hd d 6ƒtiƒ}|i t |i d gƒt |i ƒ}|i iid }|iˆd |ƒ|id|d|dddt|idS(s;Test that we can authenticate using the auth plugin system.s http://non-keystone-url.com/v2.0tMockEntrypointcseZ‡fd†ZRS(csˆS(N((R(t FakePlugin(sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pytload’s(t__name__t __module__Rd((Rc(sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyRb‘sRccs eZd„Z‡fd†ZRS(cSs|i|hdd6ƒdS(Ntmetfake(t _authenticate(RtclsRM((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyt authenticate–scsˆS(N((R(tnon_keystone_auth_url(sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyt get_auth_url™s(ReRfRkRm((Rl(sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyRc•s csˆdddgƒgS(RhRc((t_t(Rb(sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pytœsRRRRhtOS_AUTH_SYSTEMRWs/tokenstPOSTtheaderstdatas{"fake": "me"}tallow_redirectsN(t pkg_resourcest EntryPointRtBaseAuthPluginRURR RR(R8tKeyErrorR)RtcstclientRMR-tassert_any_calltTruetTEST_REQUEST_BASE(Rtmock_iter_entry_pointst mock_requestR3Rrt token_url((RcRbRlsO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyttest_auth_system_not_keystoneŠs&  N(ReRfRROR R"RR:RDRERLt requests_mocktMockerRTtmocktpatchRXRYt MagicMockR_tobjecttrequestsRuR(((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyR %s*         'tCinderClientArgumentParserTestcBs#eZd„Zd„Zd„ZRS(cCsƒtidtƒ}|idddddƒ|idddddd tiƒ|id gƒ}|i|iƒ|i |i ƒdS( Ntadd_helps--test-parametertdestt visible_paramtactiont store_trues--test_parametert hidden_paramR;s--test( RtCinderClientArgumentParsertFalset add_argumenttargparsetSUPPRESSt parse_argst assertTrueRŒt assertFalseR(Rtparsertopts((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyt.test_ambiguity_solved_for_one_visible_argument¹s   cCsatidtƒ}|idddddƒ|idddddƒ|it|id gƒdS( NRŠs--test-parameterR‹tvisible_param1RRŽs--test_parametertvisible_param2s--test(RRR‘R’R8R+R•(RR˜((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyt/test_raise_ambiguity_error_two_visible_argumentÉs  cCsstidtƒ}|iddddddtiƒ|iddd dddtiƒ|it|id gƒdS( NRŠs--test-parameterR‹t hidden_param1RRŽR;s--test_parametert hidden_param2s--test( RRR‘R’R“R”R8R+R•(RR˜((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyt.test_raise_ambiguity_error_two_hidden_argumentÔs    (ReRfRšRR (((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyR‰·s  (R“R>R%RR„RuR‚RˆtsixRt testtoolsRt cinderclientRRRt)cinderclient.tests.unit.test_auth_pluginsRRt$cinderclient.tests.unit.fixture_dataRtcinderclient.tests.unitRtkeystoneclient.exceptionsRXR tTestCaseR R‰(((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/test_shell.pyts(        ’