Skip to content

Commit 552f1e9

Browse files
committed
add test
1 parent 51e9bc1 commit 552f1e9

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
@@ -1880,6 +1880,17 @@ def test_partition_by(sushi_test_project: Project):
18801880
)
18811881
assert model_config.to_sqlmesh(context).partitioned_by == []
18821882

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

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

0 commit comments

Comments
 (0)