Skip to content

Commit a603313

Browse files
committed
add test
1 parent 2e146ff commit a603313

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/dbt/test_transformation.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,6 +1881,17 @@ def test_partition_by(sushi_test_project: Project):
18811881
)
18821882
assert model_config.to_sqlmesh(context).partitioned_by == []
18831883

1884+
with pytest.raises(ConfigError, match="Unexpected data_type 'string' in partition_by"):
1885+
ModelConfig(
1886+
name="model",
1887+
alias="model",
1888+
schema="test",
1889+
package_name="package",
1890+
materialized="table",
1891+
partition_by={"field": "ds", "data_type": "string"},
1892+
sql="""SELECT 1 AS one, ds FROM foo""",
1893+
)
1894+
18841895

18851896
@pytest.mark.xdist_group("dbt_manifest")
18861897
def test_partition_by_none(sushi_test_project: Project):

0 commit comments

Comments
 (0)