Skip to content

Commit 47fa1ae

Browse files
committed
add test case on limitation
1 parent 84a0ef8 commit 47fa1ae

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/integration/test_dataset.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
import pytest
33
import requests
44
from labelbox import Dataset
5-
from labelbox.exceptions import ResourceNotFoundError
5+
from labelbox.exceptions import ResourceNotFoundError, MalformedQueryException
6+
from labelbox.schema.dataset import MAX_DATAROW_PER_API_OPERATION
67

78

89
def test_dataset(client, rand_gen):
@@ -137,3 +138,12 @@ def test_create_descriptor_file(dataset):
137138
'content_type': 'application/json',
138139
'filename': 'json_import.json'
139140
}
141+
142+
143+
def test_max_dataset_limit(dataset, image_url, rand_gen):
144+
external_id = str(rand_gen)
145+
items = [dict(row_data=image_url, external_id=external_id)
146+
] * (MAX_DATAROW_PER_API_OPERATION + 1)
147+
148+
with pytest.raises(MalformedQueryException):
149+
dataset.create_data_rows(items)

0 commit comments

Comments
 (0)