File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ def _wait_for_target_processed(
272272 """
273273 while True :
274274 report = self .get_target_summary_report (target_id = target_id )
275- if report [ ' status' ] != 'processing' :
275+ if report . status != TargetStatuses . PROCESSING :
276276 return
277277
278278 sleep (seconds_between_requests )
@@ -350,10 +350,7 @@ def list_targets(self) -> List[str]:
350350
351351 return list (response .json ()['results' ])
352352
353- def get_target_summary_report (
354- self ,
355- target_id : str ,
356- ) -> Dict [str , Union [str , int ]]:
353+ def get_target_summary_report (self , target_id : str ) -> TargetSummaryReport :
357354 """
358355 Get a summary report for a target.
359356
Original file line number Diff line number Diff line change @@ -300,10 +300,10 @@ def test_wait_for_target_processed(
300300 application_metadata = None ,
301301 )
302302 report = vws_client .get_target_summary_report (target_id = target_id )
303- assert report [ ' status' ] == 'processing'
303+ assert report . status == TargetStatuses . PROCESSING
304304 vws_client .wait_for_target_processed (target_id = target_id )
305305 report = vws_client .get_target_summary_report (target_id = target_id )
306- assert report [ ' status' ] != 'processing'
306+ assert report . status != TargetStatuses . PROCESSING
307307
308308 def test_default_seconds_between_requests (
309309 self ,
@@ -424,7 +424,7 @@ def test_custom_timeout(
424424 )
425425
426426 report = vws_client .get_target_summary_report (target_id = target_id )
427- assert report [ ' status' ] == 'processing'
427+ assert report . status == TargetStatuses . PROCESSING
428428 with pytest .raises (TargetProcessingTimeout ):
429429 vws_client .wait_for_target_processed (
430430 target_id = target_id ,
@@ -436,7 +436,7 @@ def test_custom_timeout(
436436 timeout_seconds = 0.5 ,
437437 )
438438 report = vws_client .get_target_summary_report (target_id = target_id )
439- assert report [ ' status' ] != 'processing'
439+ assert report . status != TargetStatuses . PROCESSING
440440
441441
442442class TestGetDuplicateTargets :
You can’t perform that action at this time.
0 commit comments