@@ -276,6 +276,16 @@ def test_search_point_intersects(load_test_data, app_client, postgres_transactio
276276 item ["collection" ], item , request = MockStarletteRequest
277277 )
278278
279+ new_coordinates = list ()
280+ for coordinate in item ["geometry" ]["coordinates" ][0 ]:
281+ new_coordinates .append ([coordinate [0 ] * - 1 , coordinate [1 ] * - 1 ])
282+ item ["id" ] = "test-item-other-hemispheres"
283+ item ["geometry" ]["coordinates" ] = [new_coordinates ]
284+ item ["bbox" ] = list (value * - 1 for value in item ["bbox" ])
285+ postgres_transactions .create_item (
286+ item ["collection" ], item , request = MockStarletteRequest
287+ )
288+
279289 point = [150.04 , - 33.14 ]
280290 intersects = {"type" : "Point" , "coordinates" : point }
281291
@@ -288,6 +298,12 @@ def test_search_point_intersects(load_test_data, app_client, postgres_transactio
288298 resp_json = resp .json ()
289299 assert len (resp_json ["features" ]) == 1
290300
301+ params ["intersects" ] = orjson .dumps (params ["intersects" ]).decode ("utf-8" )
302+ resp = app_client .get ("/search" , params = params )
303+ assert resp .status_code == 200
304+ resp_json = resp .json ()
305+ assert len (resp_json ["features" ]) == 1
306+
291307
292308def test_datetime_non_interval (load_test_data , app_client , postgres_transactions ):
293309 item = load_test_data ("test_item.json" )
0 commit comments