@@ -455,7 +455,7 @@ class TestTargetRaters:
455
455
456
456
@staticmethod
457
457
def test_default (
458
- corrupted_image_file : io .BytesIO ,
458
+ image_file_success_state_low_rating : io .BytesIO ,
459
459
high_quality_image : io .BytesIO ,
460
460
) -> None :
461
461
"""
@@ -470,10 +470,10 @@ def test_default(
470
470
server_secret_key = database .server_secret_key ,
471
471
)
472
472
473
- corrupted_image_target_id = vws_client .add_target (
473
+ low_rating_image_target_id = vws_client .add_target (
474
474
name = uuid .uuid4 ().hex ,
475
475
width = 1 ,
476
- image = corrupted_image_file ,
476
+ image = image_file_success_state_low_rating ,
477
477
application_metadata = None ,
478
478
active_flag = True ,
479
479
)
@@ -487,27 +487,26 @@ def test_default(
487
487
)
488
488
489
489
for target_id in (
490
- corrupted_image_target_id ,
490
+ low_rating_image_target_id ,
491
491
high_quality_image_target_id ,
492
492
):
493
493
vws_client .wait_for_target_processed (target_id = target_id )
494
494
495
- corrupted_image_rating = vws_client .get_target_record (
496
- target_id = corrupted_image_target_id ,
495
+ low_rated_image_rating = vws_client .get_target_record (
496
+ target_id = low_rating_image_target_id ,
497
497
).target_record .tracking_rating
498
498
499
499
high_quality_image_rating = vws_client .get_target_record (
500
500
target_id = high_quality_image_target_id ,
501
501
).target_record .tracking_rating
502
502
503
- # In the real Vuforia, this image may rate as -2.
504
- assert corrupted_image_rating <= 0
503
+ assert low_rated_image_rating <= 0
505
504
assert high_quality_image_rating > 1
506
505
507
506
@staticmethod
508
507
def test_brisque (
509
508
monkeypatch : pytest .MonkeyPatch ,
510
- corrupted_image_file : io .BytesIO ,
509
+ image_file_success_state_low_rating : io .BytesIO ,
511
510
high_quality_image : io .BytesIO ,
512
511
) -> None :
513
512
"""
@@ -524,10 +523,10 @@ def test_brisque(
524
523
server_secret_key = database .server_secret_key ,
525
524
)
526
525
527
- corrupted_image_target_id = vws_client .add_target (
526
+ low_rating_image_target_id = vws_client .add_target (
528
527
name = uuid .uuid4 ().hex ,
529
528
width = 1 ,
530
- image = corrupted_image_file ,
529
+ image = image_file_success_state_low_rating ,
531
530
application_metadata = None ,
532
531
active_flag = True ,
533
532
)
@@ -541,21 +540,20 @@ def test_brisque(
541
540
)
542
541
543
542
for target_id in (
544
- corrupted_image_target_id ,
543
+ low_rating_image_target_id ,
545
544
high_quality_image_target_id ,
546
545
):
547
546
vws_client .wait_for_target_processed (target_id = target_id )
548
547
549
- corrupted_image_rating = vws_client .get_target_record (
550
- target_id = corrupted_image_target_id ,
548
+ low_rated_image_rating = vws_client .get_target_record (
549
+ target_id = low_rating_image_target_id ,
551
550
).target_record .tracking_rating
552
551
553
552
high_quality_image_rating = vws_client .get_target_record (
554
553
target_id = high_quality_image_target_id ,
555
554
).target_record .tracking_rating
556
555
557
- # In the real Vuforia, this image may rate as -2.
558
- assert corrupted_image_rating <= 0
556
+ assert low_rated_image_rating <= 0
559
557
assert high_quality_image_rating > 1
560
558
561
559
@staticmethod
0 commit comments