Skip to content

Commit f583605

Browse files
committed
[tests] Updated test_contact_init_spec test
1 parent 9ff2de3 commit f583605

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pyatlan/model/contract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class DCColumn(AtlanYamlModel):
158158
)
159159
required: Optional[bool] = Field(
160160
default=None,
161-
description="When true, this column is the required for the table.",
161+
description="When true, this column is required for the table.",
162162
)
163163
data_type: Optional[str] = Field(
164164
default=None,

tests/integration/test_sql_assets.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,11 @@ def test_contact_init_spec(self, client: AtlanClient):
787787
contract_spec
788788
and contract_spec.dataset # type: ignore[union-attr]
789789
and contract_spec.dataset == TestTable.table.name # type: ignore[union-attr]
790+
# Ensure non-modeled fields are retained correctly
791+
# (enabled by AtlanYamlModel → Config → Extra.allow)
792+
and contract_spec.columns
793+
and len(contract_spec.columns) >= 1
794+
and contract_spec.columns[0].tags == contract_spec.columns[0].terms == []
790795
)
791796
self._assert_table_contract(contract_spec.to_yaml(), TestColumn, is_raw=False) # type: ignore[union-attr]
792797

0 commit comments

Comments
 (0)