Skip to content

Commit 2faeadc

Browse files
committed
Add pro forma tests for Client.restoreData()
1 parent 9e4dd03 commit 2faeadc

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

tests/test_06_ids.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,30 @@ def test_restore(client, case):
411411
# outcome of the restore() call.
412412
print("Status of dataset %s is now %s" % (case['dsname'], status))
413413

414+
@pytest.mark.parametrize(("case"), markeddatasets)
415+
def test_restoreData(client, case):
416+
"""Test the high level call restoreData().
417+
418+
This is essentially a no-op as the dataset in question will
419+
already be ONLINE. It only tests that the call does not throw an
420+
error.
421+
"""
422+
dataset = getDataset(client, case)
423+
client.restoreData([dataset])
424+
status = client.ids.getStatus(DataSelection([dataset]))
425+
assert status == "ONLINE"
426+
427+
@pytest.mark.parametrize(("case"), markeddatasets)
428+
def test_restoreDataSelection(client, case):
429+
"""Test the high level call restoreData().
430+
431+
Same as last test, but now pass a DataSelection as argument.
432+
"""
433+
selection = DataSelection([getDataset(client, case)])
434+
client.restoreData(selection)
435+
status = client.ids.getStatus(selection)
436+
assert status == "ONLINE"
437+
414438
@pytest.mark.parametrize(("case"), markeddatasets)
415439
def test_reset(client, case):
416440
"""Call reset() on a dataset.

0 commit comments

Comments
 (0)