/usr/lib/python2.6/site-packages/keystoneauth1/tests/unit/identity
NameSizeModeActions
test_access.py27690644editdlrm
test_access.pyc34490644editdlrm
test_identity_common.py172830644editdlrm
test_identity_common.pyc187010644editdlrm
test_identity_v2.py121950644editdlrm
test_identity_v2.pyc119850644editdlrm
test_identity_v3.py216370644editdlrm
test_identity_v3.pyc193750644editdlrm
test_identity_v3_federation.py79410644editdlrm
test_identity_v3_federation.pyc93070644editdlrm
test_identity_v3_oidc.py64970644editdlrm
test_identity_v3_oidc.pyc53390644editdlrm
test_password.py21000644editdlrm
test_password.pyc29200644editdlrm
test_token.py12220644editdlrm
test_token.pyc14650644editdlrm
utils.py48060644editdlrm
utils.pyc63480644editdlrm
__init__.py00644editdlrm
__init__.pyc1680644editdlrm
Edit: /usr/lib/python2.6/site-packages/keystoneauth1/tests/unit/identity/test_identity_common.pyc (18701B)
Ñò DVc@s_ddkZddkZddkZddkZddklZddklZddklZddklZddkl Z ddkl Z ddkl Z dd k l Z eieiƒd efd „ƒYƒZd ee ifd „ƒYZdee ifd„ƒYZde ifd„ƒYZde ifd„ƒYZde ifd„ƒYZdS(iÿÿÿÿN(t_utils(taccess(t exceptions(tfixture(tidentity(tplugin(tsession(tutilstCommonIdentityTestscBs×eZdZdZdZdZdZeiƒi Z d„Z e i d„ƒZe i d„ƒZd„Ze id „ƒZd „Zd „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zd„ZRS(shttp://127.0.0.1:5000/shttp://127.0.0.1:35357/shttp://nova/novapi/publicshttp://nova/novapi/internalshttp://nova/novapi/admincCsktt|ƒiƒd|i|if|_d|i|if|_ti d|iƒ|_ |i ƒdS(Ns%s%sthref( tsuperRtsetUpt TEST_ROOT_URLtversiontTEST_URLtTEST_ROOT_ADMIN_URLtTEST_ADMIN_URLRt DiscoveryListtTEST_DISCOVERYtstub_auth_data(tself((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyR )s cKsdS(s¹Create an auth plugin that makes sense for the auth data. It doesn't really matter what auth mechanism is used but it should be appropriate to the API version. N((Rtkwargs((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pytcreate_auth_plugin2scKsdS(sÂReturn fake authentication data. This should register a valid token response and ensure that the compute endpoints are set to TEST_COMPUTE_PUBLIC, _INTERNAL and _ADMIN. N((RR((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyt get_auth_data:scKsa|i|}|i|_y|i|_Wntj o|i|_nX|id|ƒdS(Ntjson(Rtuser_idt project_idtAttributeErrort tenant_idt stub_auth(RRttoken((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyRBs cCsdS(sThe API version being tested.N((R((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyR MscCs'|idgd|id|iƒd}|iddgd|ƒ|iƒ}tid|ƒ}|idd hd d 6d d 6|id6ƒ}|id|i ƒ|i||i ƒd}|iddgd|id|ƒ|idd hd d 6d d 6ƒ}|id|i ƒ|i||i ƒdS(NtGETtbase_urlRtSUCCESStpathttexttauths/pathtendpoint_filtertcomputet service_typetadmint interfaceR iÈs SC SUCCESS( tstub_urltTEST_COMPUTE_ADMINRRRtSessiontgetR t assertEqualt status_codeR#(Rtbodytatstresptnew_body((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyttest_discoveringQs(     c Csêh|id6hdd6g}|ii|i|ƒd}|iddgd|ƒtiƒ}|iƒ}|iƒ}xm||fD]_}|idd |d hd d 6d d6|id6ƒ}|i d|i ƒ|i ||i ƒqƒWdS(NRiôR/R!RR"R#s/pathR$R%R&R'R(R)R iÈ( Rt requests_mockR-R+R*RR,RR R.R/R#(RtrespsR0R2R1tbR$R3((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyt!test_discovery_uses_session_cacheqs       c Csêh|id6hdd6g}|ii|i|ƒd}|iddgd|ƒtiƒ}tiƒ}|iƒ}xm||fD]_}|idd |d hd d 6d d6|id6ƒ}|i d|i ƒ|i ||i ƒqƒWdS(NRiôR/R!RR"R#s/pathR$R%R&R'R(R)R iÈ( RR6R-R+R*RR,RR R.R/R#(RR7R0tsatsbR$tsessR3((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyt test_discovery_uses_plugin_cacheŠs       c CsÂ|idgd|iddƒd}|iddgd|id|ddƒ|iƒ}tid |ƒ}|id d hd d 6dd6|id6ƒ}|id|iƒ|i||i ƒdS(NRR R/iR!R"R#iÈR$s/pathR%R&R'R(R)R ( R*R+RRR,R-R R.R/R#(RR0R1R2R3((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyttest_discovering_with_no_data£s   cCsP|iƒ}tid|ƒ}|idddtiƒ}|i|i|ƒdS(NR$R'R&R)(RRR,t get_endpointRtAUTH_INTERFACER.R(RR1R2tauth_url((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyt,test_asking_for_auth_endpoint_ignores_checks¹s   cKsztiddƒ}|id|ƒ}tid|ƒ}d}|iddgd|id |ƒ|i|}||_|S( NtminutesitexpiresR0R!RR"R R#( Rt before_utcnowRRtcreateR*R+Rtauth_ref(RRRDt expired_tokentexpired_auth_refR0R1((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyt_create_expired_auth_pluginÂs cCsD|iƒ}|i}tid|ƒ}|i||i|ƒƒdS(NR$(RJRGRR,t assertIsNott get_access(RR1RIR2((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyttest_reauthenticateÏs  cCsJ|idtƒ}|i}tid|ƒ}|i||i|ƒƒdS(NtreauthenticateR$(RJtFalseRGRR,tassertIsRL(RR1RIR2((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyttest_no_reauthenticateÕs cCsr|iƒ}tid|ƒ}|iƒ|i|iƒ|i|iƒƒ|i|iƒ|i|iƒƒdS(NR$( RRR,tget_auth_headerst assertTrueRGt invalidatet assertIsNonet assertFalse(RR1R2((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyttest_invalidateÛs  cCsT|iƒ}tiƒ}|i|i|i|ƒƒ|i|i|i|ƒƒdS(N(RRR,R.Rt get_user_idRtget_project_id(RR1R2((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyttest_get_auth_propertiesçs  (t__name__t __module__R RtTEST_COMPUTE_PUBLICtTEST_COMPUTE_INTERNALR+tuuidtuuid4thext TEST_PASSR tabctabstractmethodRRRtabstractpropertyR R5R9R=R>RBRJRMRQRWRZ(((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyRs*        tV3cBs5eZed„ƒZd„Zdd„Zd„ZRS(cCsdS(Ntv3((R((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyR ñsc Ks{ti|}d}|idƒ}|id|id|ƒ|idƒ}|id|id|id|id|ƒ|S(Nt RegionOneRR(tregionR&tpublictinternal(RtV3Tokent add_servicetadd_standard_endpointsRR+R]R^(RRRRitsvc((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyRõs  cKsG|p |i}n||idhƒd<|idddg|dS(NtheaderssX-Subject-TokentPOSTR$ttokens(t TEST_TOKENt setdefaultR*(Rt subject_tokenR((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyRs cKsF|id|iƒ|id|iƒ|id|iƒti|S(NRAtusernametpassword(RtRt TEST_USERRbRt V3Password(RR((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyR sN(R[R\tpropertyR RtNoneRR(((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyRfïs  tV2cBs2eZed„ƒZd„Zd„Zd„ZRS(cCsdS(Nsv2.0((R((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyR scKsF|id|iƒ|id|iƒ|id|iƒti|S(NRARvRw(RtRRxRbRt V2Password(RR((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyRsc Ksxti|}d}|idƒ}|i|id|ƒ|idƒ}|id|id|id|id|ƒ|S(NRhRRiR&RjRkR((RtV2TokenRmt add_endpointRR]R^R+(RRRRiRo((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyRs  cKs|iddg|dS(NRqRr(R*(RR((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyR-s(R[R\RzR RRR(((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyR|s  tCatalogHackTestscBsOeZdZdZdZdZedZedZd„Zd„Z d„Z RS( s http://keystone.server:5000/v2.0shttp://other.server:5000/pathRshttp://keystone.server:5000/sv2.0RgcCstid|iƒ}|iddgd|id|ƒtiƒ}|i|iƒ}|id|id|id|iƒ|id d gd|id|ƒt i |id t i ƒi d t i ƒi ƒ}tid |ƒ}|id|iddddƒ}|i|i|ƒdS(NR Rt/R RRjR(RkRqRrRvRwR$R'R)R ii(ii(RRtBASE_URLR*R~RmtIDENTITYRtV2_URLRR}R_R`RaRR,R?R.tV3_URL(RtdiscRtservicetv2_authR<tendpoint((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyttest_getting_endpoints<s,          cCsþtiƒ}|i|iƒ}|id|id|id|iƒ|iddgd|id|ƒ|idgd|id d ƒti |id t i ƒi d t i ƒi ƒ}t id |ƒ}|id|iddddƒ}|i|i|ƒdS(NRjR(RkRqRrR RRR/i”RvRwR$R'R)R ii(ii(RR~RmRƒRR„R*R‚RR}R_R`RaRR,R?R.(RRR‡RˆR<R‰((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyt)test_returns_original_when_discover_failsZs$       c Cstid|iƒ}|iddgd|iddd|ƒtiƒ}|i|iƒ}|id|id |id |iƒ|id d gd|id|ƒt i |id t i ƒi dt i ƒi ƒ}tid|ƒ}|idtiddƒ}|i|i|ƒdS(NR RRR R/i,RRjR(RkRqRrRvRwR$R)R ii(ii(RRR‚R*R~RmRƒRR„RR}R_R`RaRR,R?RR@R.R…(RR†RR‡RˆR<R‰((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyt(test_getting_endpoints_on_auth_interfacets,          ( R[R\Rt OTHER_URLRƒR‚R„R…RŠR‹RŒ(((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyR€1s    t GenericPlugincBsMeZeiƒiZd„Zd„Zd„Zd„Z d„Z d„Z RS(cCsZtt|ƒiƒd|_hdd6dd6|_d|_h|id6td6|_dS( Nshttp://keystone.host:5000tvalueAtheaderAtvalueBtheaderBs /path/to/certtcerttverify(R RŽt__init__R‰RpR“ROtconnection_params(R((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyR•—s     cCsd|i|fS(Ns%s/%s(R‰(Rtprefix((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyturl¢scKs|iS(N(t BAD_TOKEN(RRR((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyt get_token¥scKs|iS(N(Rp(RRR((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyt get_headers©scKs|iS(N(R‰(RRR((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyR?¬scKs|iS(N(R–(RRR((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pytget_connection_params¯s( R[R\R_R`RaR™R•R˜RšR›R?Rœ(((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyRŽ“s    tGenericAuthPluginTestscBsKeZheiƒieiƒi6Zd„Zd„Zd„Zd„Z RS(cCs;tt|ƒiƒtƒ|_tid|iƒ|_dS(NR$(R RR RŽR$RR,(R((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyR ¸s cCsêtiƒi}|idd|iidƒd|ƒ|iidd|iƒ}|i ||i ƒx3t i |ii ƒD]\}}|i||ƒqxW|i|iiƒƒ|i |ii |iiƒƒ|id|iii ƒdS(NRR R—R#R%s X-Auth-Token(R_R`RaR*R$R˜RR-tENDPOINT_FILTERR.R#tsixt iteritemsRptassertRequestHeaderEqualRURšRRt assertNotInR6t last_request(RR#R3tktv((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyttest_setting_headers½s%  cCsÖtiƒi}tii|iidƒiiƒ}z˜|~}t i hdd6|d6ƒ|_ |ii dd|i ƒ}|i||iƒ|id|iidƒdtid td |iid tƒWdQXdS( NtrequestiÈR/R#R—R%RRptallow_redirectsR“R”(R_R`RatmocktpatchtobjectRt__exit__t __enter__Rt TestResponset return_valueR-RžR.R#tassert_called_once_withR$R˜tANYROR“(RR#t_[1]tmockedR3((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyttest_setting_connection_paramsÎs2    cCsitiƒi}tiƒi|ii|<|iti|ii dd|i ƒ}|i |t |ƒƒdS(NR—R%( R_R`RaR$R–t assertRaisesRtUnsupportedParametersRR-RžtassertIntstr(Rtnamete((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyt"test_setting_bad_connection_paramsãs   ( R[R\R_R`RaRžR R¦R´R»(((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyR³s    (RcR_R©RŸt keystoneauth1RRRRRRRtkeystoneauth1.tests.unitRt add_metaclasstABCMetaR«RtTestCaseRfR|R€tBaseAuthPluginRŽR(((s]/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/tests/unit/identity/test_identity_common.pyt s$    Ñ#b