Skip to content

Commit 2550044

Browse files
vdusekclaude
andcommitted
fix: correct isinstance check in webhook integration test
The `_get_finished_run_id` helper was checking `isinstance(run, ListOfRuns)` after calling `.call()`, which returns a `Run` object, not `ListOfRuns`. This caused flaky failures whenever no prior successful runs existed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 21f2665 commit 2550044

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/integration/test_webhook.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
ListOfRuns,
1515
ListOfWebhookDispatches,
1616
ListOfWebhooks,
17+
Run,
1718
Webhook,
1819
WebhookDispatch,
1920
WebhookEventType,
@@ -39,7 +40,7 @@ async def _get_finished_run_id(client: ApifyClient | ApifyClientAsync) -> str:
3940
# No completed runs found - start one and wait for it to finish
4041
run = await maybe_await(client.actor(HELLO_WORLD_ACTOR).call())
4142

42-
assert isinstance(run, ListOfRuns)
43+
assert isinstance(run, Run)
4344

4445
return run.id
4546

0 commit comments

Comments
 (0)