Skip to content

Commit cb9ed09

Browse files
vdusekclaude
andcommitted
test: align e2e and integration tests with apify-client v3 type changes
- `ActorJobStatus` is a `Literal` in client v3, not an enum; compare against the literal string directly. (Previously raised `AttributeError: SUCCEEDED` in `test_actor_push_data_*` tests.) - `Request.url` is a plain `str` in client v3, no trailing-slash normalization; drop the trailing `/` from the expected URL in `test_force_cloud`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 723ec23 commit cb9ed09

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

‎tests/e2e/test_actor_charge.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
import pytest_asyncio
88

9-
from apify_client._models import ActorJobStatus
10-
119
from apify import Actor
1210

1311
if TYPE_CHECKING:
@@ -194,7 +192,7 @@ async def test_actor_push_data_charges_both_events(
194192
run = updated_run
195193

196194
try:
197-
assert run.status == ActorJobStatus.SUCCEEDED
195+
assert run.status == 'SUCCEEDED'
198196
assert run.charged_event_counts == {
199197
'push-item': 5,
200198
'apify-default-dataset-item': 5,
@@ -226,7 +224,7 @@ async def test_actor_push_data_combined_budget_limit(
226224
run = updated_run
227225

228226
try:
229-
assert run.status == ActorJobStatus.SUCCEEDED
227+
assert run.status == 'SUCCEEDED'
230228
assert run.charged_event_counts == {
231229
'push-item': 2,
232230
'apify-default-dataset-item': 2,

‎tests/integration/test_request_queue.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ async def test_force_cloud(
11121112

11131113
request_queue_request = await request_queue_client.get_request(request_info.id)
11141114
assert request_queue_request is not None
1115-
assert str(request_queue_request.url) == 'http://example.com/'
1115+
assert str(request_queue_request.url) == 'http://example.com'
11161116

11171117

11181118
async def test_request_queue_is_finished(

0 commit comments

Comments
 (0)