def test_deleted_tasks(self):
    dataset = foz.load_zoo_dataset('quickstart', max_samples=1).clone()
    prev_ids = dataset.values('ground_truth.detections.id', unwind=True)
    anno_key = 'anno_key'
    results = dataset.annotate(anno_key, backend='cvat', label_field='ground_truth')
    api = results.connect_to_api()
    task_id = results.task_ids[0]
    api.delete_task(task_id)
    status = results.get_status()
    api.close()
    dataset.load_annotations(anno_key, cleanup=True)
    self.assertListEqual(dataset.values('ground_truth.detections.id', unwind=True), prev_ids)
def test_deleted_tasks(self):
    dataset = foz.load_zoo_dataset('quickstart', max_samples=1).clone()
    prev_ids = dataset.values('ground_truth.detections.id', unwind=True)
    anno_key = 'anno_key'
    results = dataset.annotate(anno_key, backend='cvat', label_field='ground_truth')
    api = results.connect_to_api()
    task_id = results.task_ids[0]
    api.delete_task(task_id)
    status = results.get_status()
    api.close()
    dataset.load_annotations(anno_key, cleanup=True)
    self.assertListEqual(dataset.values('ground_truth.detections.id', unwind=True), prev_ids)