@@ -38,7 +38,13 @@ def test_image_too_large(
3838 raised.
3939 """
4040 with pytest .raises (ImageTooLarge ) as exc :
41- vws_client .add_target (name = 'x' , width = 1 , image = png_too_large )
41+ vws_client .add_target (
42+ name = 'x' ,
43+ width = 1 ,
44+ image = png_too_large ,
45+ active_flag = True ,
46+ application_metadata = None ,
47+ )
4248
4349 assert exc .value .response .status_code == codes .UNPROCESSABLE_ENTITY
4450
@@ -61,7 +67,13 @@ def test_add_bad_name(vws_client: VWS, high_quality_image: io.BytesIO) -> None:
6167 max_char_value = 65535
6268 bad_name = chr (max_char_value + 1 )
6369 with pytest .raises (UnknownVWSErrorPossiblyBadName ):
64- vws_client .add_target (name = bad_name , width = 1 , image = high_quality_image )
70+ vws_client .add_target (
71+ name = bad_name ,
72+ width = 1 ,
73+ image = high_quality_image ,
74+ active_flag = True ,
75+ application_metadata = None ,
76+ )
6577
6678
6779def test_request_quota_reached () -> None :
@@ -86,6 +98,8 @@ def test_fail(high_quality_image: io.BytesIO) -> None:
8698 name = 'x' ,
8799 width = 1 ,
88100 image = high_quality_image ,
101+ active_flag = True ,
102+ application_metadata = None ,
89103 )
90104
91105 assert exc .value .response .status_code == codes .BAD_REQUEST
@@ -97,7 +111,13 @@ def test_bad_image(vws_client: VWS) -> None:
97111 """
98112 not_an_image = io .BytesIO (b'Not an image' )
99113 with pytest .raises (BadImage ) as exc :
100- vws_client .add_target (name = 'x' , width = 1 , image = not_an_image )
114+ vws_client .add_target (
115+ name = 'x' ,
116+ width = 1 ,
117+ image = not_an_image ,
118+ active_flag = True ,
119+ application_metadata = None ,
120+ )
101121
102122 assert exc .value .response .status_code == codes .UNPROCESSABLE_ENTITY
103123
@@ -110,9 +130,21 @@ def test_target_name_exist(
110130 A ``TargetNameExist`` exception is raised after adding two targets with
111131 the same name.
112132 """
113- vws_client .add_target (name = 'x' , width = 1 , image = high_quality_image )
133+ vws_client .add_target (
134+ name = 'x' ,
135+ width = 1 ,
136+ image = high_quality_image ,
137+ active_flag = True ,
138+ application_metadata = None ,
139+ )
114140 with pytest .raises (TargetNameExist ) as exc :
115- vws_client .add_target (name = 'x' , width = 1 , image = high_quality_image )
141+ vws_client .add_target (
142+ name = 'x' ,
143+ width = 1 ,
144+ image = high_quality_image ,
145+ active_flag = True ,
146+ application_metadata = None ,
147+ )
116148
117149 assert exc .value .response .status_code == codes .FORBIDDEN
118150
@@ -143,6 +175,8 @@ def test_project_inactive(
143175 name = 'x' ,
144176 width = 1 ,
145177 image = high_quality_image ,
178+ active_flag = True ,
179+ application_metadata = None ,
146180 )
147181
148182 assert exc .value .response .status_code == codes .FORBIDDEN
@@ -165,6 +199,8 @@ def test_target_status_processing(
165199 name = 'x' ,
166200 width = 1 ,
167201 image = high_quality_image ,
202+ active_flag = True ,
203+ application_metadata = None ,
168204 )
169205
170206 with pytest .raises (TargetStatusProcessing ) as exc :
@@ -186,6 +222,7 @@ def test_metadata_too_large(
186222 name = 'x' ,
187223 width = 1 ,
188224 image = high_quality_image ,
225+ active_flag = True ,
189226 application_metadata = b'a' * 1024 * 1024 ,
190227 )
191228
@@ -233,6 +270,8 @@ def test_authentication_failure(high_quality_image: io.BytesIO) -> None:
233270 name = 'x' ,
234271 width = 1 ,
235272 image = high_quality_image ,
273+ active_flag = True ,
274+ application_metadata = None ,
236275 )
237276
238277 assert exc .value .response .status_code == codes .UNAUTHORIZED
@@ -260,6 +299,8 @@ def test_target_status_not_success(
260299 name = 'x' ,
261300 width = 1 ,
262301 image = high_quality_image ,
302+ active_flag = True ,
303+ application_metadata = None ,
263304 )
264305
265306 with pytest .raises (TargetStatusNotSuccess ) as exc :
@@ -281,6 +322,8 @@ def test_match_processing(
281322 name = 'x' ,
282323 width = 1 ,
283324 image = high_quality_image ,
325+ active_flag = True ,
326+ application_metadata = None ,
284327 )
285328 with pytest .raises (MatchProcessing ) as exc :
286329 cloud_reco_client .query (image = high_quality_image )
0 commit comments