Skip to content

Commit f11f980

Browse files
committed
add a unit test
1 parent 6180ef3 commit f11f980

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

nucleus/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ def delete_annotations(
10541054
if reference_ids:
10551055
payload[REFERENCE_IDS_KEY] = reference_ids
10561056
response = self.make_request(
1057-
{},
1057+
payload,
10581058
f"annotation/{dataset_id}",
10591059
requests_command=requests.delete,
10601060
)

tests/test_annotation.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,3 +302,19 @@ def test_polygon_gt_upload_ignore(dataset):
302302
assert_polygon_annotation_matches_dict(
303303
response_annotation, TEST_POLYGON_ANNOTATIONS[0]
304304
)
305+
306+
@pytest.mark.integration
307+
def test_box_gt_deletion(dataset):
308+
annotation = BoxAnnotation(**TEST_BOX_ANNOTATIONS[0])
309+
310+
print(annotation)
311+
312+
response = dataset.annotate(annotations=[annotation])
313+
314+
assert response["annotations_processed"] == 1
315+
316+
job = dataset.delete_annotations()
317+
job.sleep_until_complete()
318+
job_status = job.status()
319+
assert job_status["status"] == "Completed"
320+
assert job_status["job_id"] == job.id

0 commit comments

Comments
 (0)