Skip to content

Commit de11fde

Browse files
committed
Add test for visit schema.
1 parent c4cf981 commit de11fde

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_pqserver.py

+8
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ def lsstcomcamsim(request, astropy_tables, scope="module"):
109109
# Insert rows into the SQL table
110110
connection.execute(sql_table.insert(), rows)
111111

112+
with instance.engine.begin() as connection:
113+
connection.exec_driver_sql(
114+
"DROP VIEW IF EXISTS cdb_lsstcomcamsim.visit1;"
115+
"CREATE VIEW cdb_lsstcomcamsim.visit1 AS"
116+
" SELECT * FROM cdb_lsstcomcamsim.exposure;"
117+
)
118+
112119
yield TestClient(pqserver.app)
113120

114121

@@ -268,6 +275,7 @@ def test_schema_instrument(lsstcomcamsim):
268275
"exposure_flexdata_schema",
269276
"ccdexposure_flexdata",
270277
"ccdexposure_flexdata_schema",
278+
"visit1",
271279
]
272280
tables = [f"cdb_lsstcomcamsim.{t}" for t in tables]
273281
for t in tables:

0 commit comments

Comments
 (0)