Skip to content

Commit a26ce7f

Browse files
committed
fix(mssql): Update mssql tests
1 parent 014172a commit a26ce7f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/core/engine_adapter/test_mssql.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_columns(adapter: MSSQLEngineAdapter):
7979
}
8080

8181
adapter.cursor.execute.assert_called_once_with(
82-
"""SELECT [column_name], [data_type], [character_maximum_length], [numeric_precision], [numeric_scale] FROM [information_schema].[columns] WHERE [table_name] = 'table' AND [table_schema] = 'db';"""
82+
"""SELECT [COLUMN_NAME], [DATA_TYPE], [CHARACTER_MAXIMUM_LENGTH], [NUMERIC_PRECISION], [NUMERIC_SCALE] FROM [INFORMATION_SCHEMA].[COLUMNS] WHERE [TABLE_NAME] = 'table' AND [TABLE_SCHEMA] = 'db';"""
8383
)
8484

8585

@@ -149,8 +149,8 @@ def test_table_exists(make_mocked_engine_adapter: t.Callable):
149149
resp = adapter.table_exists("db.table")
150150
adapter.cursor.execute.assert_called_once_with(
151151
"""SELECT 1 """
152-
"""FROM [information_schema].[tables] """
153-
"""WHERE [table_name] = 'table' AND [table_schema] = 'db';"""
152+
"""FROM [INFORMATION_SCHEMA].[TABLES] """
153+
"""WHERE [TABLE_NAME] = 'table' AND [TABLE_SCHEMA] = 'db';"""
154154
)
155155
assert resp
156156
adapter.cursor.fetchone.return_value = None
@@ -506,7 +506,7 @@ def test_replace_query(make_mocked_engine_adapter: t.Callable):
506506
adapter.replace_query("test_table", parse_one("SELECT a FROM tbl"), {"a": "int"})
507507

508508
assert to_sql_calls(adapter) == [
509-
"""SELECT 1 FROM [information_schema].[tables] WHERE [table_name] = 'test_table';""",
509+
"""SELECT 1 FROM [INFORMATION_SCHEMA].[TABLES] WHERE [TABLE_NAME] = 'test_table';""",
510510
"TRUNCATE TABLE [test_table];",
511511
"INSERT INTO [test_table] ([a]) SELECT [a] FROM [tbl];",
512512
]

0 commit comments

Comments
 (0)