Skip to content

Commit 0877ac3

Browse files
committed
test_dataset.py: Added bulk conversation upload test
1 parent d1cc207 commit 0877ac3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/integration/test_dataset.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import json
12
import pytest
23
import requests
34
from labelbox import Dataset
@@ -101,6 +102,17 @@ def test_upload_video_file(dataset, sample_video: str) -> None:
101102
assert response.headers['Content-Type'] == 'video/mp4'
102103

103104

105+
def test_bulk_conversation(dataset, sample_bulk_conversation: list) -> None:
106+
"""
107+
Tests that bulk conversations can be uploaded.
108+
109+
"""
110+
task = dataset.create_data_rows(sample_bulk_conversation)
111+
task.wait_till_done()
112+
113+
assert len(list(dataset.data_rows())) == len(sample_bulk_conversation)
114+
115+
104116
def test_data_row_export(dataset, image_url):
105117
n_data_rows = 5
106118
ids = set()

0 commit comments

Comments
 (0)