/usr/lib/python2.6/site-packages/jsonschema/tests
NameSizeModeActions
compat.py2150644editdlrm
compat.pyc3910644editdlrm
test_cli.py35750644editdlrm
test_cli.pyc47200644editdlrm
test_exceptions.py133920644editdlrm
test_exceptions.pyc153610644editdlrm
test_format.py21500644editdlrm
test_format.pyc34960644editdlrm
test_jsonschema_test_suite.py96440644editdlrm
test_jsonschema_test_suite.pyc133780644editdlrm
test_validators.py332100644editdlrm
test_validators.pyc376890644editdlrm
__init__.py00644editdlrm
__init__.pyc1480644editdlrm
Edit: /usr/lib/python2.6/site-packages/jsonschema/tests/test_validators.pyc (37689B)
Ñò DVc @sddklZddklZddkZddklZlZddkl Z l Z ddk l Z l Z lZlZlZlZlZlZlZde ifd„ƒYZd e ifd „ƒYZd e ifd „ƒYZd e ifd„ƒYZdefd„ƒYZdee ifd„ƒYZdee ifd„ƒYZde ifd„ƒYZxHeiD]=Z e d„Z!di e ƒZ"e"e!_#e$ee"e!ƒ[!qmWde ifd„ƒYZ%de ifd„ƒYZ&de ifd„ƒYZ'd„Z(dS( iÿÿÿÿ(tdeque(tcontextmanagerN(t FormatCheckertValidationError(tmocktunittest( tRefResolutionErrort UnknownTypetDraft3ValidatortDraft4Validatort RefResolvertcreatetextendt validator_fortvalidatetTestCreateAndExtendcBsGeZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs¥hhhd6d6|_tiƒ|_h|id6|_htd6|_td|id|id|iƒ|_d|_ h|i d6|_ |i|i ƒ|_ dS(Nusmellyu propertiesudictt meta_schemat validatorst default_typesi ( RRt MagicMocktsmellyRtdictttypesR t Validatortvalidator_valuetschemat validator(tself((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pytsetUps   cCsO|i|ii|iƒ|i|ii|iƒ|i|ii|iƒdS(N(t assertEqualRt VALIDATORSRt META_SCHEMARt DEFAULT_TYPESR(R((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt test_attrsscCs|i|ii|iƒdS(N(RRR(R((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt test_init"scCsšd}g|i_|it|ii|ƒƒgƒtiƒ}|g|i_|it|ii|ƒƒ|gƒ|ii|i|i ||i ƒdS(Nthello( Rt return_valueRtlistRt iter_errorsRtMocktassert_called_withRR(Rtinstanceterror((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_iter_errors%s " % c Csxtidƒiiƒ}z5|~}d„|_tdhdd6ddƒ}WdQX|idƒ|i|idƒdS( Nsjsonschema.validators.validatescSsd„S(cSs|S(((tcls((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt5s((tversion((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyR-5sRtuidR.s my versiontMyVersionValidator( Rtpatcht__exit__t __enter__t side_effectR tassert_called_once_withRt__name__(Rt_[1]t validatesR((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt.test_if_a_version_is_provided_it_is_registered3s & " c CsTtidƒiiƒ}z!|~}tdhdd6ƒWdQX|i|iƒdS(Nsjsonschema.validators.validatesRtiduid(RR1R2R3R t assertFalsetcalled(RR7R8((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt6test_if_a_version_is_not_provided_it_is_not_registered:s&cCs¯t|iiƒ}tiƒ}t|idh|d6ƒ}|id|fgƒ|i|i|ƒ|id|iiƒ|i|i |ii ƒ|i|i |ii ƒdS(NRu a new one( RRRRR'R tupdateRt assertNotInRR (RRtnewtExtended((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt test_extend?s ( R6t __module__RR!R"R+R9R=RB(((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyR s      tTestIterErrorscBs#eZd„Zd„Zd„ZRS(cCsthƒ|_dS(N(RR(R((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyRNscCs£ddg}hdd6dddgdd d ggd 6d d 6}d„|ii||ƒDƒ}d|dfdd|dfg}|it|ƒt|ƒƒdS(NiiuarrayudisallowtatbtctdtetfuenumiuminItemscssx|]}|iVqWdS(N(tmessage(t.0RI((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pys Ys s%r is disallowed for [1, 2]tdisallows[1, 2] is too shorts[1, 2] is not one of %rtenum(RR&Rtsorted(RR)Rtgottexpected((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyR+Qs  cCs¤hdd6dgd6dd6dd6}hhhd d 6d6hdd 6d6hd d 6ddddgd6d6d6}t|ii||ƒƒ}|it|ƒdƒdS(NitfooitbaritbaztspamtquuxtstringutypeuminItemsi umaximumiiiuenumu properties(R%RR&Rtlen(RR)Rterrors((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt0test_iter_errors_multiple_failures_one_validatoras%((R6RCRR+RZ(((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyRDMs  tTestValidationErrorMessagescBs†eZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „ZRS(c OsY|idtƒ|itƒiiƒ}z |~}t||||ŽWdQX|iiS(NR,( t setdefaultRt assertRaisesRR2R3Rt exceptionRK(RR)RtargstkwargsR7RI((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt message_forps&cCs7|idddhdd6ƒ}|i|ddƒdS(NR)iRustringutypes1 is not of type %r(RaR(RRK((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_single_type_failurevscCs:|idddhdgd6ƒ}|i|ddƒdS(NR)iRustringutypes1 is not of type %r(RaR(RRK((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_single_type_list_failurezs"cCsCd}|idddht|ƒd6ƒ}|i|d|ƒdS( NustringuobjectR)iRutypes1 is not of type %r, %r(ustringuobject(RaR%R(RRRK((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_multiple_type_failure~s%cCsThhdd6gd6}|idddh|gd6ƒ}|i|d|fƒdS(NiuminimumutypeR)iRs1 is not of type %r(RaR(RttypeRK((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt&test_object_without_title_type_failureƒs"cCsWd}hh|d6dd6gd6}|iddd|ƒ}|i|d |fƒdS( NtFoounameiuminimumutypeR)iRs1 is not of type %r(RaR(RtnameRRK((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt"test_object_with_name_type_failureˆscCs3|idddhdd6ƒ}|i|dƒdS(NR)iRitminimums1 is less than the minimum of 2(RaR(RRK((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt test_minimumŽscCs3|idddhdd6ƒ}|i|dƒdS(NR)iRitmaximums"1 is greater than the maximum of 0(RaR(RRK((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt test_maximum’scCsWd\}}hh||6d6}|ihdd6|ƒ}|i|d||fƒdS(NRSRRu dependenciesis%r is a dependency of %r(sbarsfoo(RaR(RtdependtonRRK((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt5test_dependencies_failure_has_single_element_not_list–s cCs7|idghgd6td6ƒ}|id|ƒdS(NiuitemsuadditionalItemss(2 was unexpected)(RatFalsetassertIn(RRK((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt#test_additionalItems_single_failureœscCs=|idddghgd6td6ƒ}|id|ƒdS(NiiiuitemsuadditionalItemss(1, 2, 3 were unexpected)(RaRqRr(RRK((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt&test_additionalItems_multiple_failures¢s#cCsGd}htd6}|ihd|6|ƒ}|id|f|ƒdS(NRRuadditionalPropertiesis(%r was unexpected)(RqRaRr(Rt additionalRRK((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt(test_additionalProperties_single_failure¨s cCsnhtd6}|itiddgƒ|ƒ}|itdƒ|ƒ|itdƒ|ƒ|id|ƒdS(NuadditionalPropertiesRRRSswere unexpected)(RqRaRtfromkeysRrtrepr(RRRK((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt+test_additionalProperties_multiple_failures®s  !cCs™tdd ƒ}tidtƒ}|idƒ|ƒhdd6}|id|d|ƒ}|itdƒ|ƒ|itdƒ|ƒ|id|ƒdS( NtformatsR$uthinguformattblatformat_checkertthingsis not a((RRR'RqtchecksRaRrRx(Rtcheckertcheck_fnRRK((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt#test_invalid_format_default_message¶s (R6RCRaRbRcRdRfRiRkRmRpRsRtRvRyR(((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyR[os             tTestValidationErrorDetailscBsYeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS( cCsþd}hhdd6hdd6gd6}t|ƒ}t|i|ƒƒ}|it|ƒdƒ|d}|i|idƒ|i|i|dƒ|i|i|ƒ|i|i|ƒ|i |i ƒ|i|i t gƒƒ|i|i t gƒƒ|i|it gƒƒ|i|it dgƒƒ|i|it dgƒƒ|i|it dgƒƒ|it|iƒd ƒt|iƒ\}}|i|idƒ|i|i|dddƒ|i|i|ƒ|i|i|ddƒ|i|i |ƒ|i|i t gƒƒ|i|it gƒƒ|i|i t gƒƒ|i|it ddgƒƒ|i|it ddgƒƒ|i|it dddgƒƒ|i|iƒ|i|idƒ|i|i|dddƒ|i|i|ƒ|i|i|ddƒ|i|i |ƒ|i|i t gƒƒ|i|i t gƒƒ|i|it gƒƒ|i|it ddgƒƒ|i|it ddgƒƒ|i|it dddgƒƒ|it|iƒdƒdS( NiiRjRWRetanyOfiii(R R%R&RRXRRR)Rt assertIsNonetparenttpathRt relative_patht absolute_patht schema_pathtrelative_schema_pathtabsolute_schema_pathtcontextt sorted_errorstassertIsR;(RR)RRRYRIte1te2((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt test_anyOfÆs\   "cCs(hdd6}hhdd6hdd6hhdgd6d6d6gd6}t|ƒ}t|i|ƒƒ}|it|ƒdƒ|d }|i|idƒ|i|i|dƒ|i|i|ƒ|i|i|ƒ|i |i ƒ|i|i t gƒƒ|i|i t gƒƒ|i|it gƒƒ|i|it dgƒƒ|i|it dgƒƒ|i|it dgƒƒ|it|iƒdƒt|iƒ\}}|i|idƒ|i|i|dd dƒ|i|i|ƒ|i|i|dd ƒ|i|i |ƒ|i|i t gƒƒ|i|i t gƒƒ|i|it gƒƒ|i|it d dgƒƒ|i|it d dgƒƒ|i|it dd dgƒƒ|i|iƒ|i|idƒ|i|idgƒ|i|idƒ|i|ihdgd 6ƒ|i|i |ƒ|i|i t dgƒƒ|i|i t dgƒƒ|i|it dgƒƒ|i|it ddddgƒƒ|i|it ddddgƒƒ|i|it dddddgƒƒ|i|iƒdS( NiRRtintegerRetobjectiRNt propertiesiuenum(RR%R&RRXRRR)RR„R…R†RR‡RˆR‰RŠR‹RŒRRŽR;(RR)RRRYRIRR((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt test_typesh    "c CsBhdd6dgd6dd6dd6}hhhd d 6d6hdd 6d6hd d 6ddddgd6d6d6}t|ƒ}|i|ƒ}t|ƒ\}}}}|i|itdgƒƒ|i|itdgƒƒ|i|itdgƒƒ|i|itdgƒƒ|i|itdgƒƒ|i|itdgƒƒ|i|itdgƒƒ|i|itdgƒƒ|i|itdgƒƒ|i|itdgƒƒ|i|itdgƒƒ|i|itdgƒƒ|i|id ƒ|i|idƒ|i|id ƒ|i|id ƒdS(NiRRiRSiRTRURVRWRetminItemsi RliiiRNR”( RR&RRR†RR‡RˆR( RR)RRRYRRte3te4((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_single_nestingTs2%( c CsÕdhdd6hdgd6d6dg}hdd6hdd gd6hhdd gd 6d6hd d6hhtd 6d6hdd6d6d6d6d6d6}t|ƒ}|i|ƒ}t|ƒ\}}}}} } |i|itgƒƒ|i|itdgƒƒ|i|itddgƒƒ|i|itdddgƒƒ|i| itdddgƒƒ|i| itddgƒƒ|i|itdgƒƒ|i|itddgƒƒ|it|iƒddddgƒ|it|iƒdddddd gƒ|it| iƒddddddgƒ|it| iƒdddd gƒ|i|i dƒ|i|i dƒ|i|i dƒ|i|i d ƒ|i| i dƒ|i| i d ƒdS(NiiRRRTRSRVRWReR“iRNtarraytrequiredR–R”titemsi( tTrueRR&RRR†RR‰R%R( RR)RRRYRRR—R˜te5te6((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_multiple_nestingvsN' ! ""  cCs hhhhdd6ddgd6hhdd6d6hdd6hhdd6d 6d 6d6d 6gd 6d 6d6dd6dgd6hhdd6d6d 6}hhdd6hhdd6hhdd6d6d6d6d6d6}t|ƒ}|i|ƒ\}|i|itdgƒƒ|i|itd dd gƒƒ|i\}|i|itdddgƒƒ|i|itd dd dd dd d d g ƒƒ|i\}|i|itdddddgƒƒ|i|itd dd dd dd d d dd dd d d gƒƒdS(NR“ReRhtchildrenR›RWs#/definitions/nodes$refs^.*$tpatternPropertiesR”Rƒtnodet definitionstrootREtabi(R R&RRˆRR‹RŒ(RRR)RRIRR((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_recursive¬s„  &   "     cCs¾hdd6dd6}hhdd6dd6d6}t|ƒ}|i|ƒ}t|ƒ\}}|i|itdgƒƒ|i|itdgƒƒ|i|idƒ|i|idƒdS( NRSiRRR’ReiRjtadditionalProperties(RR&RRR†RR(RR)RRRYRR((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_additionalPropertiess cCsÌhdd6dd6}hhhdd6d6hdd6d6d 6}t|ƒ}|i|ƒ}t|ƒ\}}|i|itdgƒƒ|i|itdgƒƒ|i|idƒ|i|idƒdS( NiRSiRRRWReiRjR¢(RR&RRR†RR(RR)RRRYRR((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_patternProperties s cCs½ddg}hgd6hdd6dd6d6}t|ƒ}|i|ƒ}t|ƒ\}}|i|itd gƒƒ|i|itdgƒƒ|i|idƒ|i|idƒdS( NRRiRœR’ReiRjtadditionalItemsi(RR&RRR†RR(RR)RRRYRR((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_additionalItems3s  cCsÃdddg}hhgd6hdd6dd6d 6}t|ƒ}|i|ƒ}t|ƒ\}}|i|itdgƒƒ|i|itd gƒƒ|i|idƒ|i|idƒdS( NRRRSiRœR’ReiRjR«i(RR&RRR†RR(RR)RRRYRR((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_additionalItems_with_itemsDs  ( R6RCR‘R•R™R R§R©RªR¬R­(((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyR‚Ãs B L " 6 d   tValidatorTestMixincBskeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z RS( cCs@tiƒ|_h|_tiƒ|_|i|iƒ|_dS(N(RR'R)Rtresolvertvalidator_classR(R((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyRWs cCsbtgƒ}tii|idd|ƒiiƒz&|i|ii|i |i ƒƒWdQXdS(NR&R$( titerRR1R“RR2R3t assertTruetis_validR)R(RRY((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_valid_instances_are_valid]s   !cCskttiƒgƒ}tii|idd|ƒiiƒz&|i|ii |i |i ƒƒWdQXdS(NR&R$( R±RR'R1R“RR2R3R;R³R)R(RRY((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt$test_invalid_instances_are_not_validgs  !cCsDtiƒtiƒtiƒ}}}td|dh||6ƒdS(NR)R(RR'R(RR)t my_propertytmy_value((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt(test_non_existent_properties_are_ignoredqs&cCs|i|iitƒdS(N(tassertIsInstanceRR¯R (R((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt.test_it_creates_a_ref_resolver_if_not_providedusc Cs¼tdhƒ}htiƒd6}tii|dƒiiƒ}z`|~}dhdd6f|_|it ƒiiƒz |i |d|ƒi dƒWdQXWdQX|i |dƒdS(NR/s$reftresolveturlR’ReR¯(R RR'R1R“R2R3R$R]RR°RtNoneR5(RR¯RR7R»((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt#test_it_delegates_to_a_ref_resolverxs,(c ssdtf‡fd†ƒY}|ƒ}hdd6}ˆitƒiiƒz ˆi|d|ƒidƒWdQXdS(sc Legacy RefResolvers support only the context manager form of resolution. tLegacyRefResolvercseZe‡fd†ƒZRS(c3s ˆi|dƒhdd6VdS(Nsthe refR’Re(R(tthistref(R(sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt resolving‹s(R6RCRRÂ((R(sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyR¿Šssthe refs$refR¯N(R“R]RR2R3R°RR½(RR¿R¯R((RsD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt*test_it_delegates_to_a_legacy_ref_resolverƒs   cCs |i|iiddƒƒdS(NRRRW(R²Rtis_type(R((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt#test_is_type_is_true_for_valid_type–scCs |i|iiddƒƒdS(NRRRš(R;RRÄ(R((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt&test_is_type_is_false_for_invalid_type™scCs<|i|iitdƒƒ|i|iitdƒƒdS(NR’tnumber(R;RRÄR(R((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt,test_is_type_evades_bool_inheriting_from_intœscCs;|itƒiiƒz|iidtƒƒWdQXdS(NRR(R]RR2R3RRÄR“(R((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt.test_is_type_raises_exception_for_unknown_type s( R6RCRR´RµR¸RºR¾RÃRÅRÆRÈRÉ(((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyR®Vs       tTestDraft3ValidatorcBs)eZeZd„Zd„Zd„ZRS(cCs-|i|iitiƒhdd6ƒƒdS(NtanyRe(R²RR³RR'(R((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt!test_is_type_is_true_for_any_type¨scCsC|i|iitdƒƒ|i|iithdd6ƒƒdS(NtbooleanRËRe(R²RRÄRR³(R((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt6test_is_type_does_not_evade_bool_if_it_is_being_tested«scCsFhdgd6}|i|dhtdƒd6ƒ}|id|ƒdS(NReR(R½R°ReR(RRR,((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_non_string_custom_types¯s"(R6RCRR°RÌRÎRÏ(((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyRÊ¥s  tTestDraft4ValidatorcBseZeZRS((R6RCR R°(((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyRеstTestBuiltinFormatscBseZdZRS(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. (R6RCt__doc__(((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyRѹscCs-th|d6dtƒƒ}|idƒdS(NtformatR|i{(R RR(RRÓtv((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttestÃsstest_{0}_ignores_non_stringstTestValidatorForcBs5eZd„Zd„Zd„Zd„Zd„ZRS(cCsJhdd6}|it|ƒtƒhdd6}|it|ƒtƒdS(Ns&http://json-schema.org/draft-03/schemas$schemas'http://json-schema.org/draft-03/schema#(RŽR R(RR((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt test_draft_3Îs  cCsJhdd6}|it|ƒtƒhdd6}|it|ƒtƒdS(Ns&http://json-schema.org/draft-04/schemas$schemas'http://json-schema.org/draft-04/schema#(RŽR R (RR((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt test_draft_4Õs  cCsCtdhdd6ddƒ}hdd6}|it|ƒ|ƒdS(NRsmeta schema idR:R.t12s$schema(R RŽR (RRR((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_custom_validatorÜs cCs|ithƒtƒdS(N(RŽR R (R((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt%test_validator_for_jsonschema_defaultáscCs |ithddƒdƒdS(Ntdefault(RŽR R½(R((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt!test_validator_for_custom_defaultäs(R6RCR×RØRÚRÛRÝ(((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyRÖÍs     t TestValidatecBs#eZd„Zd„Zd„ZRS(c Cs¶hdd6}tiitdƒiiƒ}z'|~}th|ƒ|i|ƒWdQXhdd6}tiitdƒiiƒ}z'|~}th|ƒ|i|ƒWdQXdS(Ns'http://json-schema.org/draft-03/schema#s$schemat check_schemas&http://json-schema.org/draft-03/schema(RR1R“RR2R3RR5(RRR7t chk_schemat_[2]((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_draft3_validator_is_chosenés ,  , cCs]hdd6}tiitdƒiiƒ}z'|~}th|ƒ|i|ƒWdQXdS(Ns'http://json-schema.org/draft-04/schema#s$schemaRß(RR1R“R R2R3RR5(RRR7Rà((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_draft4_validator_is_chosenôs , cCsPtiitdƒiiƒ}z'|~}thhƒ|ihƒWdQXdS(NRß(RR1R“R R2R3RR5(RR7Rà((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt$test_draft4_validator_is_the_defaultús, (R6RCRâRãRä(((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyRÞès tTestRefResolvercBsŸeZdZdZhdd6Zd„Zd„Zd„Zd„Zd„Z d „Z d „Z d „Z d „Z d „Zd„Zd„Zd„Zd„ZRS(R/s foo://storedRtstoredcCsAh|_h|i|i6|_t|i|i|iƒ|_dS(N(treferrert stored_schemat stored_uritstoreR tbase_uriR¯(R((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyRs c Cs˜tid}tii|idƒiiƒ}zO|~}|ii|ƒiiƒ}z |~}|i |tiƒWdQXWdQX|i |i ƒdS(NR:tresolve_remote( RRRR1R“R¯R2R3RÂRR;R<(RRÁR7tremoteRátresolved((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt6test_it_does_not_retrieve_schema_urls_from_the_network s  /)cCskd}htƒd6|id<|ii|ƒiiƒ}z(|~}|i||iddƒWdQXdS(Ns#/properties/fooRRR”(R“RçR¯RÂR2R3R(RRÁR7Rî((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_it_resolves_local_refss)c Cs®hdd6hdd6d6}ti|ƒ}|idƒiiƒ}z!|~}|i||dƒWdQX|idƒiiƒ}z!|~}|i||dƒWdQXdS(Nshttp://bar/schema#R:RSRRREs#/ashttp://bar/schema#/a(R t from_schemaRÂR2R3R(RRR¯R7RîRá((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt#test_it_resolves_local_refs_with_ids &&c CsŸ|ii|iƒiiƒ}z |~}|i||iƒWdQXhdd6|iid<|iidƒiiƒ}z|~}|i|dƒWdQXdS(Ni RRt cached_refscached_ref#/foo( R¯RÂRéR2R3RŽRèRêR(RR7RîRá((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_it_retrieves_stored_refs s ,)c Cs¤d}hdd6}tidƒiiƒ}z^|~}||iii_|ii|ƒiiƒ}z|~}|i |dƒWdQXWdQX|ii dƒdS(Nshttp://bar#bazi RTsjsonschema.validators.requestss http://bar( RR1R2R3tgetR$tjsonR¯RÂRR5(RRÁRR7trequestsRáRî((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt,test_it_retrieves_unstored_refs_via_requests(s &)cCsÔd}hdd6}tiddƒiiƒztidƒiiƒ}zm|~}ti|ƒidƒ|ii _|i i |ƒiiƒ}z|~}|i |dƒWdQXWdQXWdQX|i dƒdS(Nshttp://bar#bazi RTsjsonschema.validators.requestssjsonschema.validators.urlopentutf8s http://bar(RR1R½R2R3RötdumpstencodeR$treadR¯RÂRR5(RRÁRR7turlopenRáRî((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt+test_it_retrieves_unstored_refs_via_urlopen2s &!)"cCs6hdd6}ti|ƒ}|i|idƒ|i|idƒ|idƒiiƒ}z|~}|i||ƒWdQX|idƒiiƒ}z|~}|i||ƒWdQX|idƒiiƒ}z|~}|i||ƒWdQX|idƒiiƒ}z|~}|i||ƒWdQXdS(NRRR:R/t#sfoo#(R RñRRëtresolution_scopeRÂR2R3(RRR¯R7RîRát_[3]t_[4]((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt.test_it_can_construct_a_base_uri_from_a_schema>s &&&&c Cs·h}ti|ƒ}|i|idƒ|i|idƒ|idƒiiƒ}z|~}|i||ƒWdQX|idƒiiƒ}z|~}|i||ƒWdQXdS(NR/Rÿ(R RñRRëRRÂR2R3(RRR¯R7RîRá((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt9test_it_can_construct_a_base_uri_from_a_schema_without_idLs&&cCsŽhdd6}d}tid|ƒ}tdhdh|d6ƒ}|i|ƒiiƒ}z|~}|i||ƒWdQX|i|ƒdS(NRSRRs foo://barR$R/thandlers(RR'R RÂR2R3RR5(RRRÁt foo_handlerR¯R7Rî((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_custom_uri_scheme_handlersVs &c Cs‡d}tiƒ}tdhdtdh|d6ƒ}|i|ƒiiƒzWdQX|i|ƒiiƒzWdQX|i|ƒdS(Ns foo://barR/t cache_remoteRRR(RR'R RRÂR2R3R5(RRÁRR¯((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_cache_remote_on_s c Csld}tiƒ}tdhdtdh|d6ƒ}|i|ƒiiƒzWdQX|i|idƒdS(Ns foo://barR/RRRRi( RR'R RqRÂR2R3Rt call_count(RRÁRR¯((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyttest_cache_remote_offks c Cs¤d}tidtdƒƒ}tdhdh|d6ƒ}|itƒiiƒ}z.|~}|i|ƒiiƒzWdQXWdQX|i t |i ƒdƒdS(Ns foo://barR4sOh no! What's this?R/RRR( RR't ValueErrorR R]RR2R3RÂRtstrR^(RRÁRR¯R7terr((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt3test_if_you_give_it_junk_you_get_a_resolution_errorus& cCsltdhƒ}|iƒ|itƒiiƒ}z|~}|iƒWdQX|idt|iƒƒdS(NR/sFailed to pop the scope( R t pop_scopeR]RR2R3RrR R^(RR¯R7texc((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyt.test_helpful_error_message_on_failed_pop_scope~s  &(R6RCRëRéRèRRïRðRòRôRøRþRRRR R RR(((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyRås"        cCsd„}t|d|ƒS(NcSsRg}|iD]}|t|ƒq~g}|iD]}|t|ƒq5~fS(N(R†R R‰(R*R7RIRá((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pytkey‡s'R(RO(RYR((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyR†s ()t collectionsRt contextlibRRöt jsonschemaRRtjsonschema.tests.compatRRtjsonschema.validatorsRRRR R R R R RtTestCaseRRDR[R‚R“R®RÊRÐRÑtcheckersRÓRÕRhR6tsetattrRÖRÞRåR(((sD/tmp/pip-build-lt8jXN/jsonschema/jsonschema/tests/test_validators.pyts2 @@"Tÿ”O   †