File tree Expand file tree Collapse file tree 1 file changed +10
-16
lines changed
Expand file tree Collapse file tree 1 file changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -984,31 +984,25 @@ def test_not_base64_encoded_processable(
984984
985985 @staticmethod
986986 def test_not_base64_encoded_not_processable (
987- vuforia_database : VuforiaDatabase ,
988987 high_quality_image : io .BytesIO ,
989988 not_base64_encoded_not_processable : str ,
989+ vws_client : VWS ,
990990 ) -> None :
991991 """
992992 Some strings which are not valid base64 encoded strings are not allowed
993993 as application metadata.
994994 """
995- image_content = high_quality_image .getvalue ()
996- image_data_encoded = base64 .b64encode (s = image_content ).decode ("ascii" )
997-
998- data = {
999- "name" : "example_name" ,
1000- "width" : 1 ,
1001- "image" : image_data_encoded ,
1002- "application_metadata" : not_base64_encoded_not_processable ,
1003- }
1004-
1005- response = _add_target_to_vws (
1006- vuforia_database = vuforia_database ,
1007- data = data ,
1008- )
995+ with pytest .raises (expected_exception = Fail ) as exc :
996+ vws_client .add_target (
997+ name = "example" ,
998+ width = 1 ,
999+ image = high_quality_image ,
1000+ application_metadata = not_base64_encoded_not_processable ,
1001+ active_flag = True ,
1002+ )
10091003
10101004 assert_vws_failure (
1011- response = response ,
1005+ response = exc . value . response ,
10121006 status_code = HTTPStatus .UNPROCESSABLE_ENTITY ,
10131007 result_code = ResultCodes .FAIL ,
10141008 )
You can’t perform that action at this time.
0 commit comments