@@ -621,23 +621,19 @@ async def test_bbox_3d(app_client, ctx):
621621@pytest .mark .asyncio
622622async def test_patch_json_collection (app_client , ctx ):
623623 data = {
624- "id" : "new_id" ,
625624 "summaries" : {"hello" : "world" , "gsd" : [50 ], "instruments" : None },
626625 }
627626
628627 resp = await app_client .patch (f"/collections/{ ctx .collection ['id' ]} " , json = data )
629628
630629 assert resp .status_code == 200
631630
632- new_resp = await app_client .get ("/collections/new_id" )
633- old_resp = await app_client .get (f"/collections/{ ctx .collection ['id' ]} " )
631+ new_resp = await app_client .get (f"/collections/{ ctx .collection ['id' ]} " )
634632
635633 assert new_resp .status_code == 200
636- assert old_resp .status_code == 404
637634
638635 new_resp_json = new_resp .json ()
639636
640- assert new_resp_json ["id" ] == "new_id"
641637 assert new_resp_json ["summaries" ]["hello" ] == "world"
642638 assert "instruments" not in new_resp_json ["summaries" ]
643639 assert new_resp_json ["summaries" ]["gsd" ] == [50 ]
@@ -686,7 +682,6 @@ async def test_patch_operations_collection(app_client, ctx):
686682async def test_patch_json_item (app_client , ctx ):
687683
688684 data = {
689- "id" : "new_id" ,
690685 "properties" : {"hello" : "world" , "proj:epsg" : 1000 , "landsat:column" : None },
691686 }
692687
@@ -696,17 +691,14 @@ async def test_patch_json_item(app_client, ctx):
696691
697692 assert resp .status_code == 200
698693
699- new_resp = await app_client .get (f"/collections/{ ctx .item ['collection' ]} /new_id" )
700- old_resp = await app_client .get (
694+ new_resp = await app_client .get (
701695 f"/collections/{ ctx .item ['collection' ]} /{ ctx .item ['id' ]} "
702696 )
703697
704698 assert new_resp .status_code == 200
705- assert old_resp .status_code == 404
706699
707700 new_resp_json = new_resp .json ()
708701
709- assert new_resp_json ["id" ] == "new_id"
710702 assert new_resp_json ["properties" ]["hello" ] == "world"
711703 assert "landsat:column" not in new_resp_json ["properties" ]
712704 assert new_resp_json ["properties" ]["proj:epsg" ] == 1000
0 commit comments