File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -593,8 +593,8 @@ def get_duplicates(
593593 other .target_id for other in other_targets
594594 if Image .open (other .image ) == Image .open (target .image ) and
595595 TargetStatuses .FAILED .value not in (target .status , other .status )
596- and TargetStatuses .PROCESSING .value not in
597- ( target . status , other . status ) and other .active_flag
596+ and TargetStatuses .PROCESSING .value != other . status
597+ and other .active_flag
598598 ]
599599
600600 body = {
Original file line number Diff line number Diff line change @@ -317,13 +317,14 @@ class TestProcessing:
317317 Tests for targets in the processing stage.
318318 """
319319
320- def test_original_processing (
320+ def test_processing (
321321 self ,
322322 vuforia_database_keys : VuforiaDatabaseKeys ,
323323 high_quality_image : io .BytesIO ,
324324 ) -> None :
325325 """
326- Checking for duplicates on a target which is processing, ...
326+ If a target is in the processing state, it can have duplicates.
327+ Targets can have duplicates in the processing state.
327328 """
328329 image_data = high_quality_image .read ()
329330 image_data_encoded = base64 .b64encode (image_data ).decode ('ascii' )
@@ -370,4 +371,11 @@ def test_original_processing(
370371 vuforia_database_keys = vuforia_database_keys ,
371372 target_id = processing_target_id ,
372373 )
373- assert response .json ()['similar_targets' ] == []
374+
375+ status_response = get_vws_target (
376+ vuforia_database_keys = vuforia_database_keys ,
377+ target_id = processing_target_id ,
378+ )
379+
380+ assert status_response .json ()['status' ] == 'processing'
381+ assert response .json ()['similar_targets' ] == [processed_target_id ]
You can’t perform that action at this time.
0 commit comments