From 9a774e49cd1181c46b2269a6bdf251c89063aead Mon Sep 17 00:00:00 2001 From: Kian-Tat Lim Date: Mon, 4 Nov 2024 16:28:18 -0800 Subject: [PATCH] Add test for visit schema. --- tests/test_pqserver.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_pqserver.py b/tests/test_pqserver.py index dcec1cef..be2f1f4c 100644 --- a/tests/test_pqserver.py +++ b/tests/test_pqserver.py @@ -103,6 +103,9 @@ 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 VIEW visit1 AS SELECT * FROM exposure;") + pqserver.engine = instance.engine pqserver.instrument_tables = pqserver.InstrumentTables() @@ -266,6 +269,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: