File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -767,3 +767,32 @@ def test_not_base64_encoded(
767767 status_code = codes .UNPROCESSABLE_ENTITY ,
768768 result_code = ResultCodes .FAIL ,
769769 )
770+
771+ def test_too_large_foo (
772+ self ,
773+ vuforia_database_keys : VuforiaDatabaseKeys ,
774+ png_rgb : io .BytesIO ,
775+ ) -> None :
776+ """
777+ A base64 encoded string is valid application metadata.
778+ """
779+ image_data = png_rgb .read ()
780+ image_data_encoded = base64 .b64encode (image_data ).decode ('ascii' )
781+
782+ # 10000 not too small
783+ metadata = b'a' * 100000
784+ metadata_encoded = base64 .b64encode (metadata ).decode ('ascii' )
785+
786+ data = {
787+ 'name' : 'example_name' ,
788+ 'width' : 1 ,
789+ 'image' : image_data_encoded ,
790+ 'application_metadata' : metadata_encoded ,
791+ }
792+
793+ response = add_target_to_vws (
794+ vuforia_database_keys = vuforia_database_keys ,
795+ data = data ,
796+ )
797+
798+ assert_success (response = response )
You can’t perform that action at this time.
0 commit comments