Skip to content

Commit

Permalink
Add test for visit schema.
Browse files Browse the repository at this point in the history
  • Loading branch information
ktlim committed Nov 5, 2024
1 parent b530fd4 commit 2b1dcc7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_pqserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ def lsstcomcamsim(request, astropy_tables, scope="module"):
# Insert rows into the SQL table
connection.execute(sql_table.insert(), rows)

with instance.engine.begin() as connection:
connection.exec_driver_sql(
"CREATE OR REPLACE VIEW cdb_lsstcomcamsim.visit1 AS"
" SELECT * FROM cdb_lsstcomcamsim.exposure;"
)

pqserver.engine = instance.engine
pqserver.instrument_tables = pqserver.InstrumentTables()

Expand Down Expand Up @@ -266,6 +272,7 @@ def test_schema_instrument(lsstcomcamsim):
"exposure_flexdata_schema",
"ccdexposure_flexdata",
"ccdexposure_flexdata_schema",
"visit1",
]
tables = [f"cdb_lsstcomcamsim.{t}" for t in tables]
for t in tables:
Expand Down

0 comments on commit 2b1dcc7

Please sign in to comment.