Skip to content

Commit 6e5000c

Browse files
committed
test pagination
1 parent 600c298 commit 6e5000c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

packages/aws-library/tests/test_s3_client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -591,20 +591,20 @@ async def test_list_objects_pagination_num_objects_limits(
591591
with_s3_bucket: S3BucketName,
592592
simcore_s3_api: SimcoreS3API,
593593
):
594-
objects = await simcore_s3_api.list_objects(
595-
bucket=with_s3_bucket,
596-
prefix=None,
597-
start_after=None,
598-
num_objects=faker.pyint(max_value=0),
599-
)
600-
assert objects == []
594+
with pytest.raises(ValueError, match=r"num_objects must be >= 1"):
595+
await simcore_s3_api.list_objects(
596+
bucket=with_s3_bucket,
597+
prefix=None,
598+
start_after=None,
599+
limit=faker.pyint(max_value=0),
600+
)
601601

602602
with pytest.raises(ValueError, match=r"num_objects must be <= \d+"):
603603
await simcore_s3_api.list_objects(
604604
bucket=with_s3_bucket,
605605
prefix=None,
606606
start_after=None,
607-
num_objects=_AWS_MAX_ITEMS_PER_PAGE + 1,
607+
limit=_AWS_MAX_ITEMS_PER_PAGE + 1,
608608
)
609609

610610

0 commit comments

Comments
 (0)