summaryrefslogtreecommitdiffstats
path: root/tests/test_schema.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-16 11:37:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-16 11:37:35 +0000
commit45eab59f38aae326a4970767f9bc7119bef339b9 (patch)
treef5a21c1bba9fd891c923cc14206986691931ca47 /tests/test_schema.py
parentAdding upstream version 18.11.6. (diff)
downloadsqlglot-45eab59f38aae326a4970767f9bc7119bef339b9.tar.xz
sqlglot-45eab59f38aae326a4970767f9bc7119bef339b9.zip
Adding upstream version 18.13.0.upstream/18.13.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_schema.py')
-rw-r--r--tests/test_schema.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_schema.py b/tests/test_schema.py
index 626fa11..34c507d 100644
--- a/tests/test_schema.py
+++ b/tests/test_schema.py
@@ -272,3 +272,8 @@ class TestSchema(unittest.TestCase):
str(ctx.exception),
"Table z must match the schema's nesting level: 2.",
)
+
+ def test_has_column(self):
+ schema = MappingSchema({"x": {"c": "int"}})
+ self.assertTrue(schema.has_column("x", exp.column("c")))
+ self.assertFalse(schema.has_column("x", exp.column("k")))