Skip to content

Commit 5dbf7d9

Browse files
committed
added test case
1 parent cc50701 commit 5dbf7d9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/integration/test_data_rows.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,3 +276,17 @@ def test_create_data_rows_sync_mixed_upload(dataset, image_url):
276276
DataRow.row_data: image_url
277277
}] * n_urls + [fp.name] * n_local)
278278
assert len(list(dataset.data_rows())) == n_local + n_urls
279+
280+
281+
def test_delete_data_row_attachment(datarow, image_url):
282+
attachment_uids = []
283+
attachments = [("IMAGE", image_url), ("TEXT", "test-text"),
284+
("IMAGE_OVERLAY", image_url), ("HTML", image_url)]
285+
for attachment_type, attachment_value in attachments:
286+
attachment_uids.append(
287+
datarow.create_attachment(attachment_type, attachment_value).uid)
288+
289+
for uid in attachment_uids:
290+
datarow.delete_attachment(uid)
291+
292+
assert len(list(datarow.attachments())) == 0

0 commit comments

Comments
 (0)