File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -360,16 +360,20 @@ def _load_models_and_seeds(self) -> None:
360360 )
361361
362362 self ._models_per_package [node .package_name ][node_name ] = ModelConfig (
363- sql = sql ,
364- dependencies = dependencies ,
365- tests = tests ,
366- ** node_config ,
363+ ** dict (
364+ node_config ,
365+ sql = sql ,
366+ dependencies = dependencies ,
367+ tests = tests ,
368+ )
367369 )
368370 else :
369371 self ._seeds_per_package [node .package_name ][node_name ] = SeedConfig (
370- dependencies = Dependencies (macros = macro_references ),
371- tests = tests ,
372- ** node_config ,
372+ ** dict (
373+ node_config ,
374+ dependencies = Dependencies (macros = macro_references ),
375+ tests = tests ,
376+ )
373377 )
374378
375379 def _load_on_run_start_end (self ) -> None :
Original file line number Diff line number Diff line change @@ -75,7 +75,8 @@ def test_load_invalid_ref_audit_constraints(
7575 dbt_project_dir .mkdir ()
7676 dbt_model_dir = dbt_project_dir / "models"
7777 dbt_model_dir .mkdir ()
78- full_model_contents = "SELECT 1 as cola"
78+ # add `tests` to model config since this is loaded by dbt and ignored and we shouldn't error when loading it
79+ full_model_contents = """{{ config(tags=["blah"], tests=[{"blah": {"to": "ref('completely_ignored')", "field": "blah2"} }]) }} SELECT 1 as cola"""
7980 full_model_file = dbt_model_dir / "full_model.sql"
8081 with open (full_model_file , "w" , encoding = "utf-8" ) as f :
8182 f .write (full_model_contents )
You can’t perform that action at this time.
0 commit comments