@@ -299,7 +299,7 @@ def test_semantic_search(self, sync_client: OMOPHub, base_url: str) -> None:
299299 },
300300 "meta" : {"pagination" : {"page" : 1 , "has_next" : False , "total_items" : 1 }},
301301 }
302- route = respx .get (f"{ base_url } /concepts /semantic-search " ).mock (
302+ route = respx .get (f"{ base_url } /search /semantic" ).mock (
303303 return_value = Response (200 , json = semantic_response )
304304 )
305305
@@ -316,7 +316,7 @@ def test_semantic_search_with_filters(
316316 self , sync_client : OMOPHub , base_url : str
317317 ) -> None :
318318 """Test semantic search with all filters."""
319- route = respx .get (f"{ base_url } /concepts /semantic-search " ).mock (
319+ route = respx .get (f"{ base_url } /search /semantic" ).mock (
320320 return_value = Response (200 , json = {"success" : True , "data" : {"results" : []}})
321321 )
322322
@@ -353,7 +353,7 @@ def test_semantic_iter_single_page(
353353 ],
354354 "meta" : {"pagination" : {"page" : 1 , "has_next" : False }},
355355 }
356- respx .get (f"{ base_url } /concepts /semantic-search " ).mock (
356+ respx .get (f"{ base_url } /search /semantic" ).mock (
357357 return_value = Response (200 , json = semantic_response )
358358 )
359359
@@ -385,7 +385,7 @@ def mock_response(request):
385385 return Response (200 , json = page1_response )
386386 return Response (200 , json = page2_response )
387387
388- respx .get (f"{ base_url } /concepts /semantic-search " ).mock (side_effect = mock_response )
388+ respx .get (f"{ base_url } /search /semantic" ).mock (side_effect = mock_response )
389389
390390 results = list (sync_client .search .semantic_iter ("diabetes" , page_size = 1 ))
391391 assert len (results ) == 2
@@ -402,7 +402,7 @@ def test_semantic_iter_empty_response(
402402 "data" : [],
403403 "meta" : {"pagination" : {"page" : 1 , "has_next" : False }},
404404 }
405- respx .get (f"{ base_url } /concepts /semantic-search " ).mock (
405+ respx .get (f"{ base_url } /search /semantic" ).mock (
406406 return_value = Response (200 , json = semantic_response )
407407 )
408408
@@ -555,7 +555,7 @@ async def test_async_semantic_search(
555555 "results" : [{"concept_id" : 4329847 , "similarity_score" : 0.95 }],
556556 },
557557 }
558- respx .get (f"{ base_url } /concepts /semantic-search " ).mock (
558+ respx .get (f"{ base_url } /search /semantic" ).mock (
559559 return_value = Response (200 , json = semantic_response )
560560 )
561561
@@ -568,7 +568,7 @@ async def test_async_semantic_with_filters(
568568 self , async_client : omophub .AsyncOMOPHub , base_url : str
569569 ) -> None :
570570 """Test async semantic search with filters."""
571- route = respx .get (f"{ base_url } /concepts /semantic-search " ).mock (
571+ route = respx .get (f"{ base_url } /search /semantic" ).mock (
572572 return_value = Response (200 , json = {"success" : True , "data" : {"results" : []}})
573573 )
574574
@@ -591,7 +591,7 @@ async def test_async_semantic_with_all_filters(
591591 self , async_client : omophub .AsyncOMOPHub , base_url : str
592592 ) -> None :
593593 """Test async semantic search with all available filters."""
594- route = respx .get (f"{ base_url } /concepts /semantic-search " ).mock (
594+ route = respx .get (f"{ base_url } /search /semantic" ).mock (
595595 return_value = Response (200 , json = {"success" : True , "data" : {"results" : []}})
596596 )
597597
@@ -629,7 +629,7 @@ async def test_async_semantic_iter_single_page(
629629 ],
630630 "meta" : {"pagination" : {"page" : 1 , "has_next" : False }},
631631 }
632- respx .get (f"{ base_url } /concepts /semantic-search " ).mock (
632+ respx .get (f"{ base_url } /search /semantic" ).mock (
633633 return_value = Response (200 , json = semantic_response )
634634 )
635635
@@ -674,7 +674,7 @@ def mock_response(request):
674674 return Response (200 , json = page2_response )
675675 return Response (200 , json = page3_response )
676676
677- respx .get (f"{ base_url } /concepts /semantic-search " ).mock (side_effect = mock_response )
677+ respx .get (f"{ base_url } /search /semantic" ).mock (side_effect = mock_response )
678678
679679 results = []
680680 async for item in async_client .search .semantic_iter ("diabetes" , page_size = 1 ):
@@ -696,7 +696,7 @@ async def test_async_semantic_iter_with_filters(
696696 "data" : [{"concept_id" : 1 , "similarity_score" : 0.9 }],
697697 "meta" : {"pagination" : {"page" : 1 , "has_next" : False }},
698698 }
699- route = respx .get (f"{ base_url } /concepts /semantic-search " ).mock (
699+ route = respx .get (f"{ base_url } /search /semantic" ).mock (
700700 return_value = Response (200 , json = semantic_response )
701701 )
702702
@@ -732,7 +732,7 @@ async def test_async_semantic_iter_empty_response(
732732 "data" : [],
733733 "meta" : {"pagination" : {"page" : 1 , "has_next" : False }},
734734 }
735- respx .get (f"{ base_url } /concepts /semantic-search " ).mock (
735+ respx .get (f"{ base_url } /search /semantic" ).mock (
736736 return_value = Response (200 , json = semantic_response )
737737 )
738738
0 commit comments