Skip to content

Commit 7178673

Browse files
committed
SA14: Add test fixture for testing VIEWs
1 parent a7b4721 commit 7178673

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/crate/client/sqlalchemy/doctests/reflection.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ List all tables::
2020
List all views::
2121

2222
>>> inspector.get_view_names()
23-
[]
24-
25-
>>> inspector.get_view_names(schema='sys')
26-
[]
23+
['characters_view']
2724

2825
Get default schema name::
2926

src/crate/client/tests.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ def setUpCrateLayerAndSqlAlchemy(test):
195195
more_details array(object),
196196
INDEX name_ft using fulltext(name) with (analyzer = 'english'),
197197
INDEX quote_ft using fulltext(quote) with (analyzer = 'english')
198-
) """)
198+
)""")
199+
cursor.execute("CREATE VIEW characters_view AS SELECT * FROM characters")
199200

200201
with connect(crate_host) as conn:
201202
cursor = conn.cursor()
@@ -342,6 +343,7 @@ def tearDownWithCrateLayer(test):
342343
for stmt in ["DROP TABLE locations",
343344
"DROP BLOB TABLE myfiles",
344345
"DROP TABLE characters",
346+
"DROP VIEW characters_view",
345347
"DROP TABLE cities",
346348
"DROP USER me",
347349
"DROP USER trusted_me",

0 commit comments

Comments
 (0)