bg ddlZddlZGddeZGddeZGddeZGdd eZGd d e Z Gd d ej Z dS)NceZdZdZdS)ForJsonc ddiS)Nfor_jsonselfs q/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib64/python3.11/site-packages/simplejson/tests/test_for_json.pyrzForJson.for_jsons AN__name__ __module__ __qualname__rrr r rrs#r rceZdZdZdS) NestedForJsonc"dtiSNnested)rr s r rzNestedForJson.for_json s'))$$r Nr rr r rr s#%%%%%r rceZdZdZdS) ForJsonListcdgSNlistrr s r rzForJsonList.for_json xr Nr rr r rr#r rceZdZdZdS) DictForJsonc ddiS)Nalpharrr s r rzDictForJson.for_jsons |r Nr rr r rrs#r rceZdZdZdS) ListForJsoncdgSrrr s r rzListForJson.for_jsonrr Nr rr r r"r"rr r"cXeZdZddZdZdZdZdZdZdZ d Z d Z d Z d Z d ZdS) TestForJsonTc|tj|}ntj||}|tj||dS)Nr)jsondumps assertEqualloads)r objotherrss r assertRoundTripzTestForJson.assertRoundTrips[   3AA 3222A  JqMM      r c|ttdSNr/rrr s r (test_for_json_encodes_stand_alone_objectz4TestForJson.test_for_json_encodes_stand_alone_object)s>  II II    " " " " "r c|dtidtidS)Nhoorayr2r s r +test_for_json_encodes_object_nested_in_dictz7TestForJson.test_for_json_encodes_object_nested_in_dict.sH  wyy ! wyy))++ , . . . . .r c|ddtddgiddtddgidS)Nrrr2r s r 7test_for_json_encodes_object_nested_in_list_within_dictzCTestForJson.test_for_json_encodes_object_nested_in_list_within_dict3sZ  aAq) * a++--q!4 5 7 7 7 7 7r cR|tdddiidS)Nrrr)r/rr s r 1test_for_json_encodes_object_nested_within_objectz=TestForJson.test_for_json_encodes_object_nested_within_object8s7  OO  A ' ) ) ) ) )r c|ttdSr1r/rrr s r test_for_json_encodes_listz&TestForJson.test_for_json_encodes_list=s>  MM MM " " $ $ & & & & &r c|dtidtidSrr>r s r (test_for_json_encodes_list_within_objectz4TestForJson.test_for_json_encodes_list_within_objectBsH  {}} % {}}--// 0 2 2 2 2 2r c|tdtddS)Nra)r/rrr s r #test_for_json_encodes_dict_subclassz/TestForJson.test_for_json_encodes_dict_subclassGsL  !    !    % % ' ' ) ) ) ) )r c|tdgtdgdS)Nl)r/r"rr s r #test_for_json_encodes_list_subclassz/TestForJson.test_for_json_encodes_list_subclassLsJ        ' ' ) ) + + + + +r c`dD]*}|tdddi|+dS)NNFrrCrDr')r/rr rs r 4test_for_json_ignored_if_not_true_with_dict_subclassz@TestForJson.test_for_json_ignored_if_not_true_with_dict_subclassQsU% # #H  a   a! ! # # # # # #r c^dD])}|tdgdg|*dS)NrJrGr')r/r"rKs r 4test_for_json_ignored_if_not_true_with_list_subclassz@TestForJson.test_for_json_ignored_if_not_true_with_list_subclassXsR% # #H  SE""! ! # # # # # #r c|ttjt |ttjt ddS)NFr') assertRaises TypeErrorr(r)rr s r 6test_raises_typeerror_if_for_json_not_true_with_objectzBTestForJson.test_raises_typeerror_if_for_json_not_true_with_object_sI )TZ;;; )TZUKKKKKr N)T)rrrr/r3r6r:r<r?rArErHrLrNrRrr r r%r%s""" ... 777 ))) &&& 222 ))) +++ ######LLLLLr r%) unittest simplejsonr(objectrrrdictrrr"TestCaser%rr r rXs7f %%%%%F%%% & $ $ CLCLCLCLCL(#CLCLCLCLCLr