diff options
| author | Gord Thompson <gord@gordthompson.com> | 2022-12-09 09:55:34 -0700 |
|---|---|---|
| committer | Gord Thompson <gord@gordthompson.com> | 2022-12-09 09:55:34 -0700 |
| commit | 7e9b1450b6899c82c9362cbc92fcc0f01c97b043 (patch) | |
| tree | 34cb7c2cc863abe292aa1164687eee34900de1dc /lib/sqlalchemy/testing | |
| parent | 8a152ec391118a05ac54974d0f013cf0e99c7832 (diff) | |
| download | sqlalchemy-7e9b1450b6899c82c9362cbc92fcc0f01c97b043.tar.gz | |
Specify view columns in HasTableTest
Fixes: #8960
Avoid test errors on databases that do not
support CREATE VIEW vv AS SELECT * FROM
Change-Id: Ic9e892aa4466030b9b325c11228dad15cf59a258
Diffstat (limited to 'lib/sqlalchemy/testing')
| -rw-r--r-- | lib/sqlalchemy/testing/suite/test_reflection.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py index 60f8fabf1..2550eff4e 100644 --- a/lib/sqlalchemy/testing/suite/test_reflection.py +++ b/lib/sqlalchemy/testing/suite/test_reflection.py @@ -88,15 +88,18 @@ class HasTableTest(OneConnectionTablesTest): @classmethod def define_views(cls, metadata): - query = "CREATE VIEW vv AS SELECT * FROM test_table" + query = "CREATE VIEW vv AS SELECT id, data FROM test_table" event.listen(metadata, "after_create", DDL(query)) event.listen(metadata, "before_drop", DDL("DROP VIEW vv")) if testing.requires.schemas.enabled: - query = "CREATE VIEW %s.vv AS SELECT * FROM %s.test_table_s" % ( - config.test_schema, - config.test_schema, + query = ( + "CREATE VIEW %s.vv AS SELECT id, data FROM %s.test_table_s" + % ( + config.test_schema, + config.test_schema, + ) ) event.listen(metadata, "after_create", DDL(query)) event.listen( |
