/usr/lib/python2.6/site-packages/keystoneclient/tests/unit
NameSizeModeActions
apiclient/-0755rm
auth/-0755rm
generic/-0755rm
v2_0/-0755rm
v3/-0755rm
client_fixtures.py263360644editdlrm
client_fixtures.pyc161520644editdlrm
test_auth_token_middleware.py799550644editdlrm
test_auth_token_middleware.pyc863840644editdlrm
test_base.py65000644editdlrm
test_base.pyc75220644editdlrm
test_cms.py66850644editdlrm
test_cms.pyc82650644editdlrm
test_discovery.py301950644editdlrm
test_discovery.pyc310730644editdlrm
test_ec2utils.py118980644editdlrm
test_ec2utils.pyc99850644editdlrm
test_fixtures.py98850644editdlrm
test_fixtures.pyc85620644editdlrm
test_hacking_checks.py18700644editdlrm
test_hacking_checks.pyc23530644editdlrm
test_http.py82990644editdlrm
test_http.pyc91130644editdlrm
test_https.py41860644editdlrm
test_https.pyc40440644editdlrm
test_keyring.py81500644editdlrm
test_keyring.pyc71860644editdlrm
test_memcache_crypt.py43420644editdlrm
test_memcache_crypt.pyc45930644editdlrm
test_s3_token_middleware.py112030644editdlrm
test_s3_token_middleware.pyc129890644editdlrm
test_session.py377180644editdlrm
test_session.pyc435120644editdlrm
test_shell.py242970644editdlrm
test_shell.pyc213180644editdlrm
test_utils.py84310644editdlrm
test_utils.pyc124350644editdlrm
utils.py68400644editdlrm
utils.pyc89170644editdlrm
__init__.py00644editdlrm
__init__.pyc1680644editdlrm
Edit: /usr/lib/python2.6/site-packages/keystoneclient/tests/unit/test_shell.pyc (21318B)
Ñò tiD]3}|idƒo|iti|dƒƒqqWx1|i D]&}|iti||i |ƒƒq^WdS(NtOS_t( tsuperRtsetUptostenviront startswitht useFixturetfixturestEnvironmentVariabletFAKE_ENV(Rtvar((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyR As ! cCs'|ititdtiƒiƒdS(Nshelp %s(t assertRaisesRRRtuuidtuuid4thex(R((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_help_unknown_commandLsc CsÒti}h}ti|iƒ}t_zty2tiƒt_tiƒ}|i |i ƒƒWn;t j o/ti ƒ\}}}|i |idƒnXWdtiiƒ} tiiƒ|t_|t_X| S(Ni(tsyststdoutR!R"tcopytsixtStringIOR R R R t SystemExittexc_infot assertEqualtcodetgetvaluetclose( Rtargstrtorigt clean_envt_old_envt_shelltexc_typet exc_valuet exc_tracebacktout((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyRPs      cCsRtiƒ}tid|ƒiiƒz"|idƒ|ipt‚WdQXdS(Ns3keystoneclient.shell.OpenStackIdentityShell.do_helpR(tmockt MagicMocktpatcht__exit__t __enter__RtcalledtAssertionError(Rtdo_tenant_mock((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_help_no_argsbs    cCs2d}|idƒ}|i|ti|ƒƒdS(Nsusage:thelp(Rt assertThatRt MatchesRegex(Rtrequiredt help_text((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyt test_helpis cCs2d}|idƒ}|i|ti|ƒƒdS(Nsusage: keystone user-createshelp user-create(RRLRRM(RRNRO((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_help_commandos cCs2d}|idƒ}|i|ti|ƒƒdS(Nsusage: keystone user-updateshelp user-update(RRLRRM(RRNRO((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyt(test_help_command_with_no_action_choicesus cCs8titidƒiiƒz|idƒWdQXdS(Nt Expectings user-list(t testtoolstExpectedExceptionRRRERFR(R((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_auth_no_credentials{sc Cs†tiƒ}tid|ƒiiƒzV|iti|idƒ|i |i ƒ|i dht i d6gt|iƒƒWdQXdS(Nslogging.basicConfigs--debug user-listtlevel((RBRCRDRERFR)RRRt assertTrueRGR5tloggingtDEBUGtlistt call_args(Rt logging_mock((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyt test_debug€s   cCsTtitidƒiiƒz-|idtiƒi tiƒi fƒWdQXdS(Ns(Expecting a username provided via eithers+--os-password=%s --os-auth-url=%s user-list( RTRURRRERFRR*R+R,(R((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyt&test_auth_password_authurl_no_username‰s  cCsTtitidƒiiƒz-|idtiƒi tiƒi fƒWdQXdS(Ns Expecting an auth URL via eithers+--os-password=%s --os-username=%s user-list( RTRURRRERFRR*R+R,(R((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyt&test_auth_username_password_no_authurls cCsEtitidƒiiƒz|idtiƒi ƒWdQXdS(NsExpecting an endpoint provideds--os-token=%s user-list( RTRURRRERFRR*R+R,(R((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_token_no_endpoint–scCs8titidƒiiƒz|idƒWdQXdS(NsExpecting a token provideds2--os-endpoint=http://10.0.0.1:5000/v2.0/ user-list(RTRURRRERFR(R((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_endpoint_no_token›sc Cs-tiƒ}tid|ƒiiƒzýtdƒ|ipt‚|i\\}}}|i |i |i |i |i |if}tttttdf}|itg}t||ƒD]\}} ||| jq¹~ƒƒtdƒ|ipt‚|i\\}}}|i |i |i |i |i |if}d}|itg} t||ƒD]\}} | || jq\~ ƒƒtd ƒ|ipt‚|i\\}}}|i |i |i |i |i |if}d}|itg} t||ƒD]\}} | || jqÿ~ ƒƒtdƒ|ipt‚|i\\}}}|i |i |i |i |i |i|i|i|if }d dd ddd tdtf }|itg} t||ƒD]\}} | || jqÏ~ ƒƒtdƒ|ipt‚|i|id ƒWdQXdS(Ns&keystoneclient.v2_0.shell.do_user_lists user-listRsž--os_auth_url http://0.0.0.0:5000/ --os_password xyzpdq --os_tenant_id 1234 --os_tenant_name fred --os_username barney --os_identity_api_version 2.0 user-listshttp://0.0.0.0:5000/txyzpdqt1234tfredtbarneys2.0sž--os-auth-url http://1.1.1.1:5000/ --os-password xyzpdq --os-tenant-id 4321 --os-tenant-name wilma --os-username betty --os-identity-api-version 2.0 user-listshttp://1.1.1.1:5000/t4321twilmatbettysÐ--os-auth-url http://1.1.1.1:5000/ --os-password xyzpdq --os-tenant-id 4321 --os-tenant-name wilma --os-username betty --os-identity-api-version 2.0 --os-cache --stale-duration 500 --force-new-token user-listt500s'--os-identity-api-version 3.0 user-list(shttp://0.0.0.0:5000/Rcs1234ReRfs2.0(shttp://1.1.1.1:5000/RcRgRhRis2.0(RBRCRDRERFRRGRHR\t os_auth_urlt os_passwordt os_tenant_idtos_tenant_namet os_usernametos_identity_api_versiontDEFAULT_AUTH_URLtDEFAULT_PASSWORDtDEFAULT_TENANT_IDtDEFAULT_TENANT_NAMEtDEFAULT_USERNAMERXtalltziptos_cachetstale_durationtforce_new_tokentTrue( RRItatbtctactualtexpectt_[1]txtyt_[2]t_[3]t_[4]((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_shell_args sV      C   C   C    C cCsätiƒ}ttdƒ}t|dgƒ|_tid|ƒiiƒztdƒ|i pt ‚|i \\}}}|i |i |i|i|i|if}tttttdf}|itg}t||ƒD]\} } || | jqÝ~ƒƒ|i|i|i|if}d}|itg} t||ƒD]\} } | | | jqD~ ƒƒtd ƒ|i pt ‚|i \\}}}|i |i |i|i|i|if}tttttdf}|itg} t||ƒD]\} } | | | jqù~ ƒƒ|i|i|i|if}d}|itg} t||ƒD]\} } | | | jq`~ ƒƒtd ƒ|i pt ‚|i \\}}}|i |i |i|i|i|if}tttttdf}|itg}t||ƒD]\} } || | jq~ƒƒ|i|i|i|if}d}|itg}t||ƒD]\} } || | jq|~ƒƒtdƒ|i pt ‚|i \\}}}|i |i |i|i|i|if}ttdttdf}|itg}t||ƒD]\} } || | jq1~ƒƒ|i|i|i|if}d}|itg}t||ƒD]\} } || | jq˜~ƒƒtdƒ|i pt ‚|i \\}}}|i |i |i|i|i|if}ttdttdf}|itg}t||ƒD]\} } || | jqM~ƒƒ|i|i|i|if}d}|itg}t||ƒD]\} } || | jq´~ƒƒWdQXdS(sTest user-create args.tdo_user_createt argumentss(keystoneclient.v2_0.shell.do_user_createsEuser-create --name=FOO --pass=secret --tenant_id=barrr --enabled=trueRtbarrrtFOOtsecretttruesBuser-create --name=foo --pass=secret --tenant=BARRR --enabled=truetBARRRtfoosEuser-create --name=foo --pass=secret --tenant-id=BARRR --enabled=trues^--os_tenant_id=os-tenant user-create --name=FOO --pass=secret --tenant_id=barrr --enabled=trues os-tenants]--os-tenant-id=ostenant user-create --name=foo --pass=secret --tenant-id=BARRR --enabled=truetostenantN(RŠR‹RŒstrue(RŽRRŒstrue(RŽRRŒstrue(RŠR‹RŒstrue(RŽRRŒstrue(RBRCtgetattrt shell_v2_0R‰RDRERFRRGRHR\RkRlRmRnRoRpRqRrRsRtRuRXRvRwRtnametpasswdtenabledttenant(Rt do_uc_mocktuc_funcR|R}R~RR€RR‚RƒR„R…R†t_[5]t_[6]t_[7]t_[8]t_[9]t_[10]((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_shell_user_create_argsás‚      CC    CC    CC    CC    CcCsOtiƒ}tid|ƒiiƒztdƒ|ipt‚WdQXdS(Ns*keystoneclient.v2_0.shell.do_tenant_creates tenant-create(RBRCRDRERFRRGRH(RRI((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_do_tenant_create:s    cCsOtiƒ}tid|ƒiiƒztdƒ|ipt‚WdQXdS(Ns(keystoneclient.v2_0.shell.do_tenant_lists tenant-list(RBRCRDRERFRRGRH(RRI((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_do_tenant_listEs    cCs˜tiƒ}ttdƒ}t|dgƒ|_tid|ƒiiƒzDtdƒ|i pt ‚|i \\}}}|i |i |i|i|i|if}tttttdf}|itg}t||ƒD]\} } || | jqÝ~ƒƒ|i|if}d}|itg} t||ƒD]\} } | | | jq8~ ƒƒtdƒ|i pt ‚|i \\}}}|i |i |i|i|i|if}tttttdf}|itg} t||ƒD]\} } | | | jqí~ ƒƒ|i|if}d}|itg} t||ƒD]\} } | | | jqH~ ƒƒtd ƒ|i pt ‚|i \\}}}|i |i |i|i|i|if}ttd ttdf}|itg}t||ƒD]\} } || | jqý~ƒƒ|i|if}d}|itg}t||ƒD]\} } || | jqX~ƒƒtd ƒ|i pt ‚|i \\}}}|i |i |i|i|i|if}ttdttdf}|itg}t||ƒD]\} } || | jq ~ƒƒ|i|if}d}|itg}t||ƒD]\} } || | jqh~ƒƒWdQXdS(s[Test a corner case where --tenant_id appears on the command-line twice. tdo_ec2_credentials_createR‰s3keystoneclient.v2_0.shell.do_ec2_credentials_creates@ec2-credentials-create --tenant_id=ec2-tenant --user_id=ec2-userRs ec2-tenantsec2-usersBec2-credentials-create --tenant-id=dash-tenant --user-id=dash-users dash-tenants dash-usersY--os_tenant_id=os-tenant ec2-credentials-create --tenant_id=ec2-tenant --user_id=ec2-users os-tenantsZ--os-tenant-id=ostenant ec2-credentials-create --tenant-id=dash-tenant --user-id=dash-userRN(s ec2-tenantsec2-user(s dash-tenants dash-user(s ec2-tenantsec2-user(s dash-tenants dash-user(RBRCR‘R’R‰RDRERFRRGRHR\RkRlRmRnRoRpRqRrRsRtRuRXRvRwRtuser_id(Rt do_ec2_mocktec2_funcR|R}R~RR€RR‚RƒR„R…R†R™RšR›Rœ((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_shell_tenant_id_argsLsj      CC    CC    CC    CcCs tiƒ}tid|ƒiiƒztdƒ|ipt‚WdQXtid|ƒiiƒztdƒ|ipt‚WdQXtid|ƒiiƒztdƒ|ipt‚WdQXtid|ƒiiƒztdƒ|ipt‚WdQXdS( Ns3keystoneclient.v2_0.shell.do_ec2_credentials_createsec2-credentials-creates0keystoneclient.v2_0.shell.do_ec2_credentials_getsec2-credentials-gets1keystoneclient.v2_0.shell.do_ec2_credentials_listsec2-credentials-lists3keystoneclient.v2_0.shell.do_ec2_credentials_deletesec2-credentials-delete(RBRCRDRERFRRGRH(Rt do_shell_mock((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_do_ec2_get—s"         cCs>x7ddgD])}d|}|iti|i|ƒq WdS(Ntfoobartxyzs--timeout %s endpoint-create(R)RRR(RtfR ((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_timeout_parse_invalid_type®s    cCs>x7ddgD])}d|}|iti|i|ƒq WdS(Niÿÿÿÿis--timeout %s endpoint-create(R)RRR(RR«R ((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyt!test_timeout_parse_invalid_number´s    cCs¯tiƒ}d|_tihgd6ƒ|_tid|ƒ}tiiti d|ƒi i ƒzBt dƒ|i titidddtd tid tiƒWdQXdS( NiÈt endpointst return_valuetrequestsT--timeout 2 --os-token=blah --os-endpoint=blah --os-auth-url=blah.com endpoint-listttimeoutitallow_redirectstheaderstverify(RBRCt status_codetjsontdumpsttextRDtobjectRtrequestsRERFRtassert_called_withtANYtFalse(Rt response_mockt request_mock((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_do_timeoutºs     cCsštiƒ}ttdƒ}t|dgƒ|_tid|ƒiiƒzFtdƒ|i pt ‚|i \\}}}|i |i |i|i|i|if}tttttdf}|itg}t||ƒD]\} } || | jqÝ~ƒƒ|i|i|if}d }|itg} t||ƒD]\} } | | | jq>~ ƒƒtd ƒ|i pt ‚|i \\}}}|i |i |i|i|i|if}tttttdf}|itg} t||ƒD]\} } | | | jqó~ ƒƒ|i|i|if}d}|itg} t||ƒD]\} } | | | jqT~ ƒƒtd ƒ|i pt ‚|i \\}}}|i |i |i|i|i|if}tttttdf}|itg}t||ƒD]\} } || | jq ~ƒƒ|i|i|if}d}|itg}t||ƒD]\} } || | jqj~ƒƒWdQXdS(Ntdo_endpoint_createR‰s,keystoneclient.v2_0.shell.do_endpoint_createslendpoint-create --service_id=2 --publicurl=http://example.com:1234/go --adminurl=http://example.com:9876/admRt2shttp://example.com:1234/goshttp://example.com:9876/admslendpoint-create --service-id=3 --publicurl=http://example.com:4321/go --adminurl=http://example.com:9876/admt3shttp://example.com:4321/gosiendpoint-create --service=3 --publicurl=http://example.com:4321/go --adminurl=http://example.com:9876/adm(RÂshttp://example.com:1234/goshttp://example.com:9876/adm(RÃshttp://example.com:4321/goshttp://example.com:9876/adm(RÃshttp://example.com:4321/goshttp://example.com:9876/adm(RBRCR‘R’R‰RDRERFRRGRHR\RkRlRmRnRoRpRqRrRsRtRuRXRvRwtservicet publicurltadminurl(RR§t shell_funcR|R}R~RR€RR‚RƒR„R…R†R™Rš((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_do_endpointsËs^      CC    CC    Cc Csytiƒ}tid|ƒiiƒzIytƒ|_tiƒWn(t j o}|i d|i ƒnXWdQXdS(Ns0keystoneclient.shell.OpenStackIdentityShell.maini‚( RBRCRDRERFtKeyboardInterruptt side_effectR R R3R5R6(Rt shell_mocktex((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyttest_shell_keyboard_interrupt s   (!RRRuRrRsRtRqR'RR R-RRJRPRQRRRVR^R_R`RaRbR‡RŸR R¡R¦R¨R¬R­RÀRÈRÍ(((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyR2s>              A Y  K     A(targparseR¶RYR!R.R*R%RBR1RTRtkeystoneclientRRRR tkeystoneclient.tests.unitRtkeystoneclient.v2_0R’RuRrRsRtRqtArgumentParserRtTestCaseR(((sS/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/tests/unit/test_shell.pyt s.