@@ -717,8 +717,10 @@ async def test_json_patch_collection_add(ctx, core_client, txn_client):
717717 collection_id = collection ["id" ]
718718 operations = [
719719 PatchAddReplaceTest .model_validate (
720- {"op" : "add" , "path" : "summaries.foo" , "value" : "bar" },
721- {"op" : "add" , "path" : "summaries.gsd.1" , "value" : 100 },
720+ {"op" : "add" , "path" : "/summaries/foo" , "value" : "bar" },
721+ ),
722+ PatchAddReplaceTest .model_validate (
723+ {"op" : "add" , "path" : "/summaries/gsd/1" , "value" : 100 },
722724 ),
723725 ]
724726
@@ -742,7 +744,7 @@ async def test_json_patch_collection_replace(ctx, core_client, txn_client):
742744 collection_id = collection ["id" ]
743745 operations = [
744746 PatchAddReplaceTest .model_validate (
745- {"op" : "replace" , "path" : "summaries. gsd" , "value" : [100 ]}
747+ {"op" : "replace" , "path" : "/ summaries/ gsd" , "value" : [100 ]}
746748 ),
747749 ]
748750
@@ -756,7 +758,7 @@ async def test_json_patch_collection_replace(ctx, core_client, txn_client):
756758 collection_id , request = MockRequest
757759 )
758760
759- assert updated_collection ["summaries" ]["gsd" ] == 100
761+ assert updated_collection ["summaries" ]["gsd" ] == [ 100 ]
760762
761763
762764@pytest .mark .asyncio
@@ -765,7 +767,7 @@ async def test_json_patch_collection_test(ctx, core_client, txn_client):
765767 collection_id = collection ["id" ]
766768 operations = [
767769 PatchAddReplaceTest .model_validate (
768- {"op" : "test" , "path" : "summaries. gsd" , "value" : 15 }
770+ {"op" : "test" , "path" : "/ summaries/ gsd" , "value" : [ 30 ] }
769771 ),
770772 ]
771773
@@ -779,7 +781,7 @@ async def test_json_patch_collection_test(ctx, core_client, txn_client):
779781 collection_id , request = MockRequest
780782 )
781783
782- assert updated_collection ["summaries" ]["gsd" ] == 15
784+ assert updated_collection ["summaries" ]["gsd" ] == [ 30 ]
783785
784786
785787@pytest .mark .asyncio
@@ -788,7 +790,7 @@ async def test_json_patch_collection_move(ctx, core_client, txn_client):
788790 collection_id = collection ["id" ]
789791 operations = [
790792 PatchMoveCopy .model_validate (
791- {"op" : "move" , "path" : "summaries. bar" , "from" : "summaries. gsd" }
793+ {"op" : "move" , "path" : "/ summaries/ bar" , "from" : "/ summaries/ gsd" }
792794 ),
793795 ]
794796
@@ -802,7 +804,7 @@ async def test_json_patch_collection_move(ctx, core_client, txn_client):
802804 collection_id , request = MockRequest
803805 )
804806
805- assert updated_collection ["summaries" ]["bar" ] == [15 ]
807+ assert updated_collection ["summaries" ]["bar" ] == [30 ]
806808 assert "gsd" not in updated_collection ["summaries" ]
807809
808810
@@ -812,7 +814,7 @@ async def test_json_patch_collection_copy(ctx, core_client, txn_client):
812814 collection_id = collection ["id" ]
813815 operations = [
814816 PatchMoveCopy .model_validate (
815- {"op" : "copy" , "path" : "summaries. foo" , "from" : "summaries. gsd" }
817+ {"op" : "copy" , "path" : "/ summaries/ foo" , "from" : "/ summaries/ gsd" }
816818 ),
817819 ]
818820
@@ -836,7 +838,7 @@ async def test_json_patch_collection_remove(ctx, core_client, txn_client):
836838 collection = ctx .collection
837839 collection_id = collection ["id" ]
838840 operations = [
839- PatchRemove .model_validate ({"op" : "remove" , "path" : "summaries. gsd" }),
841+ PatchRemove .model_validate ({"op" : "remove" , "path" : "/ summaries/ gsd" }),
840842 ]
841843
842844 await txn_client .json_patch_collection (
@@ -858,7 +860,7 @@ async def test_json_patch_collection_test_wrong_value(ctx, core_client, txn_clie
858860 collection_id = collection ["id" ]
859861 operations = [
860862 PatchAddReplaceTest .model_validate (
861- {"op" : "test" , "path" : "summaries. platform" , "value" : "landsat-9" }
863+ {"op" : "test" , "path" : "/ summaries/ platform" , "value" : "landsat-9" }
862864 ),
863865 ]
864866
@@ -879,7 +881,7 @@ async def test_json_patch_collection_replace_property_does_not_exists(
879881 collection_id = collection ["id" ]
880882 operations = [
881883 PatchAddReplaceTest .model_validate (
882- {"op" : "replace" , "path" : "summaries. foo" , "value" : "landsat-9" }
884+ {"op" : "replace" , "path" : "/ summaries/ foo" , "value" : "landsat-9" }
883885 ),
884886 ]
885887
@@ -899,7 +901,7 @@ async def test_json_patch_collection_remove_property_does_not_exists(
899901 collection = ctx .collection
900902 collection_id = collection ["id" ]
901903 operations = [
902- PatchRemove .model_validate ({"op" : "remove" , "path" : "summaries. foo" }),
904+ PatchRemove .model_validate ({"op" : "remove" , "path" : "/ summaries/ foo" }),
903905 ]
904906
905907 with pytest .raises (HTTPException ):
@@ -919,7 +921,7 @@ async def test_json_patch_collection_move_property_does_not_exists(
919921 collection_id = collection ["id" ]
920922 operations = [
921923 PatchMoveCopy .model_validate (
922- {"op" : "move" , "path" : "summaries. bar" , "from" : "summaries. foo" }
924+ {"op" : "move" , "path" : "/ summaries/ bar" , "from" : "/ summaries/ foo" }
923925 ),
924926 ]
925927
@@ -940,7 +942,7 @@ async def test_json_patch_collection_copy_property_does_not_exists(
940942 collection_id = collection ["id" ]
941943 operations = [
942944 PatchMoveCopy .model_validate (
943- {"op" : "copy" , "path" : "summaries. bar" , "from" : "summaries. foo" }
945+ {"op" : "copy" , "path" : "/ summaries/ bar" , "from" : "/ summaries/ foo" }
944946 ),
945947 ]
946948
0 commit comments