Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-41245: Add a test to confirm that using undefined YAML keys throws an error #37

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/test_datamodel.py
Expand Up @@ -325,6 +325,10 @@ def test_validation(self) -> None:
with self.assertRaises(ValidationError):
Schema(name="testSchema", id="#test_id", tables=[test_tbl, test_tbl])

# Using an undefined YAML field should raise an exception.
with self.assertRaises(ValidationError):
Schema(**{"name": "testSchema", "id": "#test_sch_id", "bad_field": "1234"}, tables=[test_tbl])

def test_id_map(self) -> None:
"""Test that the id_map is properly populated."""
test_col = Column(name="testColumn", id="#test_col_id", datatype="string")
Expand Down