Skip to content

Commit 2981272

Browse files
author
Matt Sokoloff
committed
fix tests
1 parent 0d3ff53 commit 2981272

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/integration/test_data_rows.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,17 +217,21 @@ def test_data_row_attachments(dataset, image_url):
217217
def test_create_data_rows_sync_attachments(dataset, image_url):
218218
attachments = [("IMAGE", image_url), ("TEXT", "test-text"),
219219
("IMAGE_OVERLAY", image_url), ("HTML", image_url)]
220+
attachments_per_data_row = 3
220221
dataset.create_data_rows_sync([{
221-
"row_data": image_url,
222-
"external_id": "test-id",
222+
"row_data":
223+
image_url,
224+
"external_id":
225+
"test-id",
223226
"attachments": [{
224227
"type": attachment_type,
225228
"value": attachment_value
226-
}]
229+
} for _ in range(attachments_per_data_row)]
227230
} for attachment_type, attachment_value in attachments])
228231
data_rows = list(dataset.data_rows())
229232
assert len(data_rows) == len(attachments)
230-
assert list(len(data_rows[0].attachments())) == len(attachments)
233+
for data_row in data_rows:
234+
assert len(list(data_row.attachments())) == attachments_per_data_row
231235

232236

233237
def test_create_data_rows_sync_mixed_upload(dataset, image_url):

0 commit comments

Comments
 (0)