Skip to content

Commit

Permalink
Test that getDeferred fails if ref not in datastore
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Aug 3, 2023
1 parent 19dc119 commit 0662c7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ def runPutGetTest(self, storageClass: StorageClass, datasetTypeName: str) -> But
# Create DatasetRef for put using default run.
refIn = DatasetRef(datasetType, dataId, id=uuid.UUID(int=1), run=butler.run)

# Check that getDeferred fails with standalone ref.
with self.assertRaises(LookupError):
butler.getDeferred(refIn)

# Put the dataset again, since the last thing we did was remove it
# and we want to use the default collection.
ref = butler.put(metric, refIn)
Expand Down

0 comments on commit 0662c7f

Please sign in to comment.