Skip to content

Commit eadb2d3

Browse files
author
gdj0nes
committed
ADD: test cases
1 parent 01182ee commit eadb2d3

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

labelbox/schema/batch.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class Batch(DbObject):
2222
name = Field.String("name")
2323
created_at = Field.DateTime("created_at")
2424
updated_at = Field.DateTime("updated_at")
25-
deleted = Field.Boolean()
2625
size = Field.Int("size")
2726

2827
# Relationships

tests/integration/test_batch.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88

99
@pytest.fixture
1010
def big_dataset(dataset: Dataset):
11-
task = dataset.create_data_rows([
12-
{
13-
"row_data": IMAGE_URL,
14-
"external_id": "my-image"
15-
},
16-
] * 250)
11+
task = dataset.create_data_rows(
12+
[
13+
{
14+
"row_data": IMAGE_URL,
15+
"external_id": "my-image"
16+
},
17+
] * 250)
1718
task.wait_till_done()
1819

1920
yield dataset
@@ -24,4 +25,6 @@ def test_create_batch(configured_project: Project, big_dataset: Dataset):
2425
configured_project.update(queue_mode=QueueMode.Batch)
2526

2627
data_rows = [dr.uid for dr in list(big_dataset.export_data_rows())]
27-
queue_res = configured_project.create_batch("test-batch", data_rows, 3)
28+
batch = configured_project.create_batch("test-batch", data_rows, 3)
29+
assert batch.name == 'test-batch'
30+
assert batch.size == len(data_rows)

0 commit comments

Comments
 (0)