File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -820,29 +820,25 @@ def test_valid_accepted(
820820 @staticmethod
821821 def test_valid_works (
822822 high_quality_image : io .BytesIO ,
823- vuforia_database : VuforiaDatabase ,
824823 vws_client : VWS ,
824+ vwq_client : CloudRecoService ,
825825 ) -> None :
826826 """
827827 A maximum of ``max_num_results`` results are returned.
828828 """
829- image_content = high_quality_image .getvalue ()
830829 _add_and_wait_for_targets (
831830 image = high_quality_image ,
832831 vws_client = vws_client ,
833832 num_targets = 3 ,
834833 )
835834
836835 max_num_results = 2
837- body = {
838- "image" : ("image.jpeg" , image_content , "image/jpeg" ),
839- "max_num_results" : (None , max_num_results , "text/plain" ),
840- }
841836
842- response = _query (vuforia_database = vuforia_database , body = body )
843-
844- assert_query_success (response = response )
845- assert len (response .json ()["results" ]) == max_num_results
837+ result = vwq_client .query (
838+ image = high_quality_image ,
839+ max_num_results = max_num_results ,
840+ )
841+ assert len (result ) == max_num_results
846842
847843 @staticmethod
848844 @pytest .mark .parametrize ("num_results" , [- 1 , 0 , 51 ])
You can’t perform that action at this time.
0 commit comments