Skip to content

Commit

Permalink
Update tests for changes in Apdb.makeSchema interface (DM-42489)
Browse files Browse the repository at this point in the history
The `makeSchema` method is now a class method instead of instance
method and it takes configuration object as a parameter.
  • Loading branch information
andy-slac committed Jan 31, 2024
1 parent 3aac33b commit 136ad03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/test_loadDiaCatalogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import yaml

from lsst.ap.association import LoadDiaCatalogsTask, LoadDiaCatalogsConfig
from lsst.dax.apdb import ApdbSql, ApdbSqlConfig, ApdbTables
from lsst.dax.apdb import Apdb, ApdbSql, ApdbSqlConfig, ApdbTables
from lsst.utils import getPackageDir
import lsst.utils.tests
from utils_tests import makeExposure, makeDiaObjects, makeDiaSources, makeDiaForcedSources
Expand Down Expand Up @@ -64,8 +64,8 @@ def setUp(self):
self.apdbConfig.dia_object_index = "baseline"
self.apdbConfig.dia_object_columns = []

Apdb.makeSchema(self.apdbConfig)
self.apdb = ApdbSql(config=self.apdbConfig)
self.apdb.makeSchema()

self.exposure = makeExposure(False, False)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_packageAlerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from lsst.afw.cameraGeom.testUtils import DetectorWrapper
import lsst.afw.image as afwImage
import lsst.daf.base as dafBase
from lsst.dax.apdb import ApdbSql, ApdbSqlConfig
from lsst.dax.apdb import Apdb, ApdbSql, ApdbSqlConfig
import lsst.geom as geom
import lsst.meas.base.tests
from lsst.sphgeom import Box
Expand Down Expand Up @@ -71,8 +71,8 @@ def _roundTripThroughApdb(objects, sources, forcedSources, dateTime):
apdbConfig.dia_object_index = "baseline"
apdbConfig.dia_object_columns = []

Apdb.makeSchema(apdbConfig)
apdb = ApdbSql(config=apdbConfig)
apdb.makeSchema()

wholeSky = Box.full()
diaObjects = pd.concat([apdb.getDiaObjects(wholeSky), objects])
Expand Down

0 comments on commit 136ad03

Please sign in to comment.