Skip to content

Commit

Permalink
Temporary shim to allow registry tests to run
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Aug 21, 2024
1 parent 580ea25 commit 46ce1d2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion python/lsst/daf/butler/registry/tests/_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,22 @@ def loadData(self, registry: SqlRegistry, filename: str) -> None:
filename : `str`
The name of the file to load.
"""
from ..._config import Config
from ..._storage_class import StorageClassFactory
from ...datastore import NullDatastore
from ...direct_butler import DirectButler
from ...transfers import YamlRepoImportBackend

# Import API requires a butler.
butler = DirectButler(
config=Config(),
registry=registry,
datastore=NullDatastore(None, None),
storageClasses=StorageClassFactory(),
)

with open(os.path.join(self.getDataDir(), filename)) as stream:
backend = YamlRepoImportBackend(stream, registry)
backend = YamlRepoImportBackend(stream, butler)
backend.register()
backend.load(datastore=None)

Expand Down

0 comments on commit 46ce1d2

Please sign in to comment.