File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 22import pytest
33import requests
44from 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
89def 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 )
You can’t perform that action at this time.
0 commit comments