summaryrefslogtreecommitdiffstats
path: root/tests/test_schema.py
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2023-12-10 10:46:01 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2023-12-10 10:46:01 +0000
commit8fe30fd23dc37ec3516e530a86d1c4b604e71241 (patch)
tree6e2ebbf565b0351fd0f003f488a8339e771ad90c /tests/test_schema.py
parentReleasing debian version 19.0.1-1. (diff)
downloadsqlglot-8fe30fd23dc37ec3516e530a86d1c4b604e71241.tar.xz
sqlglot-8fe30fd23dc37ec3516e530a86d1c4b604e71241.zip
Merging upstream version 20.1.0.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'tests/test_schema.py')
-rw-r--r--tests/test_schema.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_schema.py b/tests/test_schema.py
index 34c507d..8bdd312 100644
--- a/tests/test_schema.py
+++ b/tests/test_schema.py
@@ -216,15 +216,15 @@ class TestSchema(unittest.TestCase):
# Check that add_table normalizes both the table and the column names to be added / updated
schema = MappingSchema()
schema.add_table("Foo", {"SomeColumn": "INT", '"SomeColumn"': "DOUBLE"})
- self.assertEqual(schema.column_names(exp.Table(this="fOO")), ["somecolumn", "SomeColumn"])
+ self.assertEqual(schema.column_names(exp.table_("fOO")), ["somecolumn", "SomeColumn"])
# Check that names are normalized to uppercase for Snowflake
schema = MappingSchema(schema={"x": {"foo": "int", '"bLa"': "int"}}, dialect="snowflake")
- self.assertEqual(schema.column_names(exp.Table(this="x")), ["FOO", "bLa"])
+ self.assertEqual(schema.column_names(exp.table_("x")), ["FOO", "bLa"])
# Check that switching off the normalization logic works as expected
schema = MappingSchema(schema={"x": {"foo": "int"}}, normalize=False, dialect="snowflake")
- self.assertEqual(schema.column_names(exp.Table(this="x")), ["foo"])
+ self.assertEqual(schema.column_names(exp.table_("x")), ["foo"])
# Check that the correct dialect is used when calling schema methods
# Note: T-SQL is case-insensitive by default, so `fo` in clickhouse will match the normalized table name