File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,20 @@ class TestRunCollectionSync:
18
18
19
19
def setup_runs (self , apify_client : ApifyClient ) -> None :
20
20
self .created_runs = []
21
- self .created_runs .append (apify_client .actor (self .APIFY_HELLO_WORLD_ACTOR ).call ())
22
21
23
- self .created_runs .append (apify_client .actor (self .APIFY_HELLO_WORLD_ACTOR ).call (timeout_secs = 1 ))
22
+ successfull_run = apify_client .actor (self .APIFY_HELLO_WORLD_ACTOR ).call ()
23
+ if successfull_run is not None :
24
+ self .created_runs .append (successfull_run )
25
+
26
+ timed_out_run = apify_client .actor (self .APIFY_HELLO_WORLD_ACTOR ).call (timeout_secs = 1 )
27
+ if timed_out_run is not None :
28
+ self .created_runs .append (timed_out_run )
24
29
25
30
def teadown_runs (self , apify_client : ApifyClient ) -> None :
26
31
for run in self .created_runs :
27
- apify_client .run (run .get ('id' )).delete ()
32
+ run_id = run .get ('id' )
33
+ if isinstance (run_id , str ):
34
+ apify_client .run (run_id ).delete ()
28
35
29
36
async def test_run_collection_list_multiple_statuses (self , apify_client : ApifyClient ) -> None :
30
37
self .setup_runs (apify_client )
You can’t perform that action at this time.
0 commit comments