File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -765,6 +765,37 @@ def test_bad_image_format_or_color_space(
765765 result_code = ResultCodes .BAD_IMAGE ,
766766 )
767767
768+ def test_corrupted (
769+ self ,
770+ vuforia_database_keys : VuforiaDatabaseKeys ,
771+ png_rgb : io .BytesIO ,
772+ target_id : str ,
773+ ) -> None :
774+ """
775+ No error is returned when the given image is corrupted.
776+ """
777+ original_data = png_rgb .getvalue ()
778+ corrupted_data = original_data .replace (b'IEND' , b'\x00 ' + b'IEND' )
779+
780+ image_data_encoded = base64 .b64encode (corrupted_data ).decode ('ascii' )
781+
782+ wait_for_target_processed (
783+ vuforia_database_keys = vuforia_database_keys ,
784+ target_id = target_id ,
785+ )
786+
787+ response = update_target (
788+ vuforia_database_keys = vuforia_database_keys ,
789+ data = {'image' : image_data_encoded },
790+ target_id = target_id ,
791+ )
792+
793+ assert_vws_response (
794+ response = response ,
795+ status_code = codes .OK ,
796+ result_code = ResultCodes .SUCCESS ,
797+ )
798+
768799 def test_too_large_and_corrupted (
769800 self ,
770801 vuforia_database_keys : VuforiaDatabaseKeys ,
You can’t perform that action at this time.
0 commit comments