mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-29 17:42:12 +08:00
Bulk delete and hide operations.
This commit is contained in:
@@ -218,6 +218,14 @@ class HistoryContentsApiTestCase(api.ApiTestCase, TestsDatasets):
|
||||
# and this is an invalid ID.
|
||||
assert update_response.status_code == 400, update_response.content
|
||||
|
||||
def test_update_batch(self):
|
||||
hda1 = self._wait_for_new_hda()
|
||||
assert str(hda1["deleted"]).lower() == "false"
|
||||
payload = dict(items=[{"history_content_type": "dataset", "id": hda1["id"]}], deleted=True)
|
||||
update_response = self._raw_update_batch(payload)
|
||||
objects = update_response.json()
|
||||
assert objects[0]["deleted"]
|
||||
|
||||
def test_update_type_failures(self):
|
||||
hda1 = self._wait_for_new_hda()
|
||||
update_response = self._raw_update(hda1["id"], dict(deleted='not valid'))
|
||||
@@ -246,6 +254,11 @@ class HistoryContentsApiTestCase(api.ApiTestCase, TestsDatasets):
|
||||
update_response = put(update_url, json=data)
|
||||
return update_response
|
||||
|
||||
def _raw_update_batch(self, data):
|
||||
update_url = self._api_url("histories/%s/contents" % (self.history_id), use_key=True)
|
||||
update_response = put(update_url, json=data)
|
||||
return update_response
|
||||
|
||||
def test_delete(self):
|
||||
hda1 = self._new_dataset(self.history_id)
|
||||
self._wait_for_history(self.history_id)
|
||||
|
||||
Reference in New Issue
Block a user