ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ ]c@sTddlmZddlmZddlZddlmZmZddlm Z m Z ddl m Z m Z mZmZmZmZmZmZmZde jfdYZd e jfd YZd e jfd YZd e jfdYZdefdYZdee jfdYZdee jfdYZde jfdYZxHejD]=Z e dZ!dj e Z"e"e!_#e$ee"e![!qmWde jfdYZ%de jfdYZ&de jfdYZ'defd YZ(d!e(e jfd"YZ)d#e(e jfd$YZ*d%Z+dS(&i(tdeque(tcontextmanagerN(t FormatCheckertValidationError(tmocktunittest( tRefResolutionErrort UnknownTypetDraft3ValidatortDraft4Validatort RefResolvertcreatetextendt validator_fortvalidatetTestCreateAndExtendcBsGeZdZdZdZdZdZdZdZRS(cCsiiid6d6|_tj|_i|jd6|_itd6|_td|jd|jd|j|_d|_ i|j d6|_ |j|j |_ dS(Nusmellyu propertiesudictt meta_schemat validatorst default_typesi ( RRt MagicMocktsmellyRtdictttypesR t Validatortvalidator_valuetschemat validator(tself((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pytsetUps   cCsO|j|jj|j|j|jj|j|j|jj|jdS(N(t assertEqualRt VALIDATORSRt META_SCHEMARt DEFAULT_TYPESR(R((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt test_attrsscCs|j|jj|jdS(N(RRR(R((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt test_init"scCsd}g|j_|jt|jj|gtj}|g|j_|jt|jj||g|jj|j|j ||j dS(Nthello( Rt return_valueRtlistRt iter_errorsRtMocktassert_called_withRR(Rtinstanceterror((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_iter_errors%s " % c Csdtjd/}d|_tdidd6dd}WdQX|jd|j|jddS( Nsjsonschema.validators.validatescSsdS(NcSs|S(N((tcls((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt5t((tversion((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyR-5R.RR.uidR/s my versiontMyVersionValidator(Rtpatcht side_effectR tassert_called_once_withRt__name__(Rt validatesR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt.test_if_a_version_is_provided_it_is_registered3s  " c Cs@tjd}tdidd6WdQX|j|jdS(Nsjsonschema.validators.validatesRtiduid(RR1R t assertFalsetcalled(RR5((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt6test_if_a_version_is_not_provided_it_is_not_registered:scCst|jj}tj}t|jdi|d6}|jd|fg|j|j||jd|jj|j|j |jj |j|j |jj dS(NRu a new one( RRRRR'R tupdateRt assertNotInRR (RRtnewtExtended((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt test_extend?s ( R4t __module__RR!R"R+R6R:R?(((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyR s      tTestIterErrorscBs#eZdZdZdZRS(cCsti|_dS(N(RR(R((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRNscCsddg}idd6dddgdd d ggd 6d d 6}d|jj||D}d|dfdd|dfg}|jt|t|dS(NiiuarrayudisallowtatbtctdtetfuenumiuminItemscss|]}|jVqdS(N(tmessage(t.0RF((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pys Yss%r is disallowed for [1, 2]tdisallows[1, 2] is too shorts[1, 2] is not one of %rtenum(RR&Rtsorted(RR)Rtgottexpected((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyR+Qs  cCsidd6dgd6dd6dd6}iiid d 6d6idd 6d6id d 6ddddgd6d6d6}t|jj||}|jt|ddS(NitfooitbaritbaztspamtquuxtstringutypeuminItemsi umaximumiiiuenumu properties(R%RR&Rtlen(RR)Rterrors((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt0test_iter_errors_multiple_failures_one_validatoras%((R4R@RR+RW(((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRAMs  tTestValidationErrorMessagescBseZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZRS(c OsE|jdt|jt}t||||WdQX|jjS(NR,(t setdefaultRt assertRaisesRRt exceptionRH(RR)RtargstkwargsRF((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt message_forpscCs7|jdddidd6}|j|dddS(NR)iRustringutypes1 is not of type %r(R^R(RRH((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_single_type_failurevscCs:|jdddidgd6}|j|dddS(NR)iRustringutypes1 is not of type %r(R^R(RRH((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_single_type_list_failurezs"cCsCd}|jdddit|d6}|j|d|dS( NustringuobjectR)iRutypes1 is not of type %r, %r(ustringuobject(R^R%R(RRRH((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_multiple_type_failure~s%cCsTiidd6gd6}|jdddi|gd6}|j|d|fdS(NiuminimumutypeR)iRs1 is not of type %r(R^R(RttypeRH((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt&test_object_without_title_type_failures"cCsWd}ii|d6dd6gd6}|jddd|}|j|d |fdS( NtFoounameiuminimumutypeR)iRs1 is not of type %r(R^R(RtnameRRH((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt"test_object_with_name_type_failurescCs3|jdddidd6}|j|ddS(NR)iRitminimums1 is less than the minimum of 2(R^R(RRH((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt test_minimumscCs3|jdddidd6}|j|ddS(NR)iRitmaximums"1 is greater than the maximum of 0(R^R(RRH((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt test_maximumscCsWd\}}ii||6d6}|jidd6|}|j|d||fdS(NRPROu dependenciesis%r is a dependency of %r(RPRO(R^R(RtdependtonRRH((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt5test_dependencies_failure_has_single_element_not_lists cCs7|jdgigd6td6}|jd|dS(NiuitemsuadditionalItemss(2 was unexpected)(R^tFalsetassertIn(RRH((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt#test_additionalItems_single_failurescCs=|jdddgigd6td6}|jd|dS(NiiiuitemsuadditionalItemss(1, 2, 3 were unexpected)(R^RnRo(RRH((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt&test_additionalItems_multiple_failuress#cCsGd}itd6}|jid|6|}|jd|f|dS(NROuadditionalPropertiesis(%r was unexpected)(RnR^Ro(Rt additionalRRH((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt(test_additionalProperties_single_failures cCsnitd6}|jtjddg|}|jtd||jtd||jd|dS(NuadditionalPropertiesRORPswere unexpected)(RnR^RtfromkeysRotrepr(RRRH((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt+test_additionalProperties_multiple_failuress  !cCstdd }tjdt}|jd|idd6}|jd|d|}|jtd||jtd||jd|dS( NtformatsR$uthinguformattblatformat_checkertthingsis not a((RRR'RntchecksR^RoRu(Rtcheckertcheck_fnRRH((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt#test_invalid_format_default_messages cCsidd6td6iidd6d6idd6d6d6}|jidd 6|d t}|j|d jtd tdtd|jidd 6d d 6|d t}|j|djtd td tdtddS(NuobjectutypeuadditionalPropertiesustringu^abc$u^def$upatternPropertiesi{uzebraR,s,{} does not match any of the regexes: {}, {}iufishs.{}, {} do not match any of the regexes: {}, {}(RnR^R RtformatRu(RRRH((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt1test_additionalProperties_false_patternPropertiess"  " (R4R@R^R_R`RaRcRfRhRjRmRpRqRsRvR~R(((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRXos              tTestValidationErrorDetailscBsYeZdZdZdZdZdZdZdZdZ dZ RS( cCsd}iidd6idd6gd6}t|}t|j|}|jt|d|d}|j|jd|j|j|d|j|j||j|j||j |j |j|j t g|j|j t g|j|jt g|j|jt dg|j|jt dg|j|jt dg|jt|jd t|j\}}|j|jd|j|j|ddd|j|j||j|j|dd|j|j ||j|j t g|j|jt g|j|j t g|j|jt ddg|j|jt ddg|j|jt dddg|j|j|j|jd|j|j|ddd|j|j||j|j|dd|j|j ||j|j t g|j|j t g|j|jt g|j|jt ddg|j|jt ddg|j|jt dddg|jt|jddS( NiiRgRTRbtanyOfiii(R R%R&RRURRR)Rt assertIsNonetparenttpathRt relative_patht absolute_patht schema_pathtrelative_schema_pathtabsolute_schema_pathtcontextt sorted_errorstassertIsR8(RR)RRRVRFte1te2((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt test_anyOfs\   "cCs(idd6}iidd6idd6iidgd6d6d6gd6}t|}t|j|}|jt|d|d }|j|jd|j|j|d|j|j||j|j||j |j |j|j t g|j|j t g|j|jt g|j|jt dg|j|jt dg|j|jt dg|jt|jdt|j\}}|j|jd|j|j|dd d|j|j||j|j|dd |j|j ||j|j t g|j|j t g|j|jt g|j|jt d dg|j|jt d dg|j|jt dd dg|j|j|j|jd|j|jdg|j|jd|j|jidgd 6|j|j ||j|j t dg|j|j t dg|j|jt dg|j|jt ddddg|j|jt ddddg|j|jt dddddg|j|jdS( NiROtintegerRbtobjectiRKt propertiesiuenum(RR%R&RRURRR)RRRRRRRRRRRRRR8(RR)RRRVRFRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt test_type sf  "  "c CsBidd6dgd6dd6dd6}iiid d 6d6idd 6d6id d 6ddddgd6d6d6}t|}|j|}t|\}}}}|j|jtdg|j|jtdg|j|jtdg|j|jtdg|j|jtdg|j|jtdg|j|jtdg|j|jtdg|j|jtdg|j|jtdg|j|jtdg|j|jtdg|j|jd |j|jd|j|jd |j|jd dS(NiROiRPiRQRRRSRTRbtminItemsi RiiiiRKR( RR&RRRRRRR( RR)RRRVRRte3te4((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_single_nestingjs2%( c Csdidd6idgd6d6dg}idd6idd gd6iidd gd 6d6id d6iitd 6d6idd6d6d6d6d6d6}t|}|j|}t|\}}}}} } |j|jtg|j|jtdg|j|jtddg|j|jtdddg|j| jtdddg|j| jtddg|j|jtdg|j|jtddg|jt|jddddg|jt|jdddddd g|jt| jddddddg|jt| jdddd g|j|j d|j|j d|j|j d|j|j d |j| j d|j| j d dS(NiiRORQRPRSRTRbRiRKtarraytrequiredRRtitemsi( tTrueRR&RRRRRR%R( RR)RRRVRRRRte5te6((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_multiple_nestingsN' ! ""  cCs iiiidd6ddgd6iidd6d6idd6iidd6d 6d 6d6d 6gd 6d 6d6dd6dgd6iidd6d6d 6}iidd6iidd6iidd6d6d6d6d6d6}t|}|j|\}|j|jtdg|j|jtd dd g|j\}|j|jtdddg|j|jtd dd dd dd d d g |j\}|j|jtdddddg|j|jtd dd dd dd d d dd dd d d gdS(NRRbRetchildrenRRTs#/definitions/nodes$refs^.*$tpatternPropertiesRRtnodet definitionstrootRBtabi(R R&RRRRR(RRR)RRFRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_recursives  &   "     cCsidd6dd6}iidd6dd6d6}t|}|j|}t|\}}|j|jtdg|j|jtdg|j|jd|j|jddS( NRPiRORRbiRgtadditionalProperties(RR&RRRRR(RR)RRRVRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_additionalProperties$s cCsidd6dd6}iiidd6d6idd6d6d 6}t|}|j|}t|\}}|j|jtdg|j|jtdg|j|jd|j|jddS( NiRPiRORTRbiRgR(RR&RRRRR(RR)RRRVRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_patternProperties2s cCsddg}igd6idd6dd6d6}t|}|j|}t|\}}|j|jtd g|j|jtdg|j|jd|j|jddS( NROiRRRbiRgtadditionalItemsi(RR&RRRRR(RR)RRRVRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_additionalItemsEs  cCsdddg}iigd6idd6dd6d 6}t|}|j|}t|\}}|j|jtdg|j|jtd g|j|jd|j|jddS( NRORPiRRRbiRgRi(RR&RRRRR(RR)RRRVRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_additionalItems_with_itemsVs  ( R4R@RRRRRRRRR(((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRs B J " 6 b   tValidatorTestMixincBskeZdZdZdZdZdZdZdZdZ dZ d Z d Z RS( cCs@tj|_i|_tj|_|j|j|_dS(N(RR'R)Rtresolvertvalidator_classR(R((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRis cCsWtg}tjj|jdd|'|j|jj|j|jWdQXdS(NR&R$( titerRR1RRt assertTruetis_validR)R(RRV((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_valid_instances_are_validos   cCs`ttjg}tjj|jdd|'|j|jj|j|j WdQXdS(NR&R$( RRR'R1RRR8RR)R(RRV((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt$test_invalid_instances_are_not_validys  cCsDtjtjtj}}}td|di||6dS(NR)R(RR'R(RR)t my_propertytmy_value((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt(test_non_existent_properties_are_ignoreds&cCs|j|jjtdS(N(tassertIsInstanceRRR (R((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt.test_it_creates_a_ref_resolver_if_not_providedsc Cstdi}itjd6}tjj|dO}didd6f|_|jt!|j|d|j dWdQXWdQX|j |ddS(NR.s$reftresolveturlRRbR( R RR'R1RR$RZRRRtNoneR3(RRRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt#test_it_delegates_to_a_ref_resolvers(cshdtffdY}|}idd6}jt!j|d|jdWdQXdS(sc Legacy RefResolvers support only the context manager form of resolution. tLegacyRefResolvercseZefdZRS(c3s j|didd6VdS(Nsthe refRRb(R(tthistref(R(sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt resolvings(R4R@RR((R(sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRssthe refs$refRN(RRZRRRR(RRRR((RsQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt*test_it_delegates_to_a_legacy_ref_resolvers   cCs |j|jjdddS(NRORT(RRtis_type(R((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt#test_is_type_is_true_for_valid_typescCs |j|jjdddS(NROR(R8RR(R((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt&test_is_type_is_false_for_invalid_typescCs<|j|jjtd|j|jjtddS(NRtnumber(R8RRR(R((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt,test_is_type_evades_bool_inheriting_from_intscCs0|jt|jjdtWdQXdS(NRO(RZRRRR(R((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt.test_is_type_raises_exception_for_unknown_types( R4R@RRRRRRRRRRR(((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRhs       tTestDraft3ValidatorcBs)eZeZdZdZdZRS(cCs-|j|jjtjidd6dS(NtanyRb(RRRRR'(R((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt!test_is_type_is_true_for_any_typescCsC|j|jjtd|j|jjtidd6dS(NtbooleanRRb(RRRRR(R((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt6test_is_type_does_not_evade_bool_if_it_is_being_testedscCsFidgd6}|j|ditdd6}|jd|dS(NRbR(RRRbR(RRR,((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_non_string_custom_typess"(R4R@RRRRR(((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRs  tTestDraft4ValidatorcBseZeZRS((R4R@R R(((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRstTestBuiltinFormatscBseZdZRS(s The built-in (specification-defined) formats do not raise type errors. If an instance or value is not a string, it should be ignored. (R4R@t__doc__(((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRscCs-ti|d6dt}|jddS(NRRyi{(R RR(RRtv((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttestsstest_{0}_ignores_non_stringstTestValidatorForcBs5eZdZdZdZdZdZRS(cCsJidd6}|jt|tidd6}|jt|tdS(Ns&http://json-schema.org/draft-03/schemas$schemas'http://json-schema.org/draft-03/schema#(RR R(RR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt test_draft_3s  cCsJidd6}|jt|tidd6}|jt|tdS(Ns&http://json-schema.org/draft-04/schemas$schemas'http://json-schema.org/draft-04/schema#(RR R (RR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt test_draft_4s  cCsCtdidd6dd}idd6}|jt||dS(NRsmeta schema idR7R/t12s$schema(R RR (RRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_custom_validators cCs|jtitdS(N(RR R (R((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt%test_validator_for_jsonschema_defaultscCs |jtiddddS(Ntdefault(RR R(R((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt!test_validator_for_custom_defaults(R4R@RRRRR(((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRs     t TestValidatecBs#eZdZdZdZRS(cCsidd6}tjjtd!}ti||j|WdQXidd6}tjjtd!}ti||j|WdQXdS(Ns'http://json-schema.org/draft-03/schema#s$schemat check_schemas&http://json-schema.org/draft-03/schema(RR1RRRR3(RRt chk_schema((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_draft3_validator_is_chosens    cCsIidd6}tjjtd!}ti||j|WdQXdS(Ns'http://json-schema.org/draft-04/schema#s$schemaR(RR1RR RR3(RRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_draft4_validator_is_chosens  cCs<tjjtd!}tii|jiWdQXdS(NR(RR1RR RR3(RR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt$test_draft4_validator_is_the_default s (R4R@RRR(((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRs tTestRefResolvercBseZdZdZidd6ZdZdZdZdZdZ d Z d Z d Z d Z d ZdZdZdZdZRS(R.s foo://storedRtstoredcCsAi|_i|j|j6|_t|j|j|j|_dS(N(treferrert stored_schemat stored_uritstoreR tbase_uriR(R((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRs c Csptjd}tjj|jd5}|jj|}|j|tjWdQXWdQX|j|j dS(NR7tresolve_remote( RRRR1RRRRR8R9(RRtremotetresolved((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt6test_it_does_not_retrieve_schema_urls_from_the_networks  cCsWd}itd6|jd<|jj|"}|j||jddWdQXdS(Ns#/properties/fooROR(RRRRR(RRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_it_resolves_local_refs$sc Csidd6idd6d6}tj|}|jd}|j||dWdQX|jd}|j||dWdQXdS(Nshttp://bar/schema#R7RPRORBs#/ashttp://bar/schema#/a(R t from_schemaRR(RRRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt#test_it_resolves_local_refs_with_id*s cCsw|jj|j}|j||jWdQXidd6|jjd<|jjd}|j|dWdQXdS(Ni ROt cached_refscached_ref#/foo(RRRRRRR(RR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_it_retrieves_stored_refs2s c Cs|d}idd6}tjdD}||jjj_|jj|}|j|dWdQXWdQX|jjddS(Nshttp://bar#bazi RQsjsonschema.validators.requestss http://bar( RR1tgetR$tjsonRRRR3(RRRtrequestsR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt,test_it_retrieves_unstored_refs_via_requests:s cCsd}idd6}tjdditjdS}tj|jd|jj_|jj |}|j |dWdQXWdQXWdQX|j ddS(Nshttp://bar#bazi RQsjsonschema.validators.requestssjsonschema.validators.urlopentutf8s http://bar( RR1RRtdumpstencodeR$treadRRRR3(RRRturlopenR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt+test_it_retrieves_unstored_refs_via_urlopenDs !"c Csidd6}tj|}|j|jd|j|jd|jd}|j||WdQX|jd}|j||WdQX|jd}|j||WdQX|jd}|j||WdQXdS(NROR7R.t#sfoo#(R RRRtresolution_scopeR(RRRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt.test_it_can_construct_a_base_uri_from_a_schemaPs cCsi}tj|}|j|jd|j|jd|jd}|j||WdQX|jd}|j||WdQXdS(NR.R(R RRRRR(RRRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt9test_it_can_construct_a_base_uri_from_a_schema_without_id^scCszidd6}d}tjd|}tdidi|d6}|j|}|j||WdQX|j|dS(NRPROs foo://barR$R.thandlers(RR'R RRR3(RRRt foo_handlerRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_custom_uri_scheme_handlershs c Csqd}tj}tdidtdi|d6}|j|WdQX|j|WdQX|j|dS(Ns foo://barR.t cache_remoteRRO(RR'R RRR3(RRRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_cache_remote_onqs c Csad}tj}tdidtdi|d6}|j|WdQX|j|jddS(Ns foo://barR.RRROi(RR'R RnRRt call_count(RRRR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyttest_cache_remote_off}s c Csd}tjdtd}tdidi|d6}|jt}|j|WdQXWdQX|jt|j ddS(Ns foo://barR2sOh no! What's this?R.RRO( RR't ValueErrorR RZRRRtstrR[(RRRRterr((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt3test_if_you_give_it_junk_you_get_a_resolution_errors cCsXtdi}|j|jt}|jWdQX|jdt|jdS(NR.sFailed to pop the scope(R t pop_scopeRZRRoRR[(RRtexc((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt.test_helpful_error_message_on_failed_pop_scopes  (R4R@RRRRRRRRRRRRRRRR R (((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRs"        tUniqueTupleItemsMixincBseZdZdZRS(s A tuple instance properly formats validation errors for uniqueItems. See https://github.com/Julian/jsonschema/pull/224 cCsk|jditd6ditfd6}|jt}|jdWdQX|jdt|jdS(NRt uniqueItemsRRis(1, 1) has non-unique elements(ii( RRttupleRZRRRoRR[(RRRF((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyt)test_it_properly_formats_an_error_messages   (R4R@RR(((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRstTestDraft4UniqueTupleItemscBseZeZRS((R4R@R R(((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRstTestDraft3UniqueTupleItemscBseZeZRS((R4R@RR(((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRscCsd}t|d|S(NcSsBg|jD]}t|^q g|jD]}t|^q)fS(N(RRR(R*RF((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pytkeysR(RL(RVR((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyRs (,t collectionsRt contextlibRRt jsonschemaRRtjsonschema.tests.compatRRtjsonschema.validatorsRRRR R R R R RtTestCaseRRARXRRRRRRtcheckersRRReR4tsetattrRRRRRRR(((sQ/opt/alt/python27/lib/python2.7/site-packages/jsonschema/tests/test_validators.pyts6 @@"lO