@@ -51,7 +51,7 @@ def test_match(
5151 )
5252 vws_client .wait_for_target_processed (target_id = target_id )
5353 [matching_target ] = cloud_reco_client .query (image = high_quality_image )
54- assert matching_target [ ' target_id' ] == target_id
54+ assert matching_target . target_id == target_id
5555
5656 def test_too_large (
5757 self ,
@@ -102,7 +102,7 @@ def test_custom_base_url(self, high_quality_image: io.BytesIO) -> None:
102102 )
103103
104104 [match ] = cloud_reco_client .query (image = high_quality_image )
105- assert match [ ' target_id' ] == target_id
105+ assert match . target_id == target_id
106106
107107
108108class TestMaxNumResults :
@@ -233,8 +233,8 @@ def test_default(
233233 image = high_quality_image ,
234234 max_num_results = 2 ,
235235 )
236- assert ' target_data' in top_match
237- assert ' target_data' not in second_match
236+ assert top_match . target_data is not None
237+ assert second_match . target_data is None
238238
239239 def test_top (
240240 self ,
@@ -267,8 +267,8 @@ def test_top(
267267 max_num_results = 2 ,
268268 include_target_data = CloudRecoIncludeTargetData .TOP ,
269269 )
270- assert ' target_data' in top_match
271- assert ' target_data' not in second_match
270+ assert top_match . target_data is not None
271+ assert second_match . target_data is None
272272
273273 def test_none (
274274 self ,
@@ -301,8 +301,8 @@ def test_none(
301301 max_num_results = 2 ,
302302 include_target_data = CloudRecoIncludeTargetData .NONE ,
303303 )
304- assert ' target_data' not in top_match
305- assert ' target_data' not in second_match
304+ assert top_match . target_data is None
305+ assert second_match . target_data is None
306306
307307 def test_all (
308308 self ,
@@ -335,5 +335,5 @@ def test_all(
335335 max_num_results = 2 ,
336336 include_target_data = CloudRecoIncludeTargetData .ALL ,
337337 )
338- assert ' target_data' in top_match
339- assert ' target_data' in second_match
338+ assert top_match . target_data is not None
339+ assert second_match . target_data is not None
0 commit comments