Skip to content

Commit

Permalink
Fix experimental_parser tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gshank committed Apr 5, 2023
1 parent 57948f4 commit c445ec0
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@ def get_manifest():
{{ config(tags='hello', x=False) }}
{{ config(tags='world', x=True) }}
select * from {{ ref('model_a') }}
select * from {{ ref('model_b') }}
cross join {{ source('my_src', 'my_tbl') }}
where false as boop
"""

basic__model_b_sql = """
select 1 as fun
"""


ref_macro__schema_yml = """
version: 2
Expand Down Expand Up @@ -92,6 +96,7 @@ class BasicExperimentalParser:
def models(self):
return {
"model_a.sql": basic__model_a_sql,
"model_b.sql": basic__model_b_sql,
"schema.yml": basic__schema_yml,
}

Expand Down Expand Up @@ -153,7 +158,7 @@ def test_experimental_parser_basic(
run_dbt(["--use-experimental-parser", "parse"])
manifest = get_manifest()
node = manifest.nodes["model.test.model_a"]
assert node.refs == [["model_a"]]
assert node.refs == [["model_b"]]
assert node.sources == [["my_src", "my_tbl"]]
assert node.config._extra == {"x": True}
assert node.config.tags == ["hello", "world"]
Expand All @@ -178,7 +183,7 @@ def test_static_parser_basic(self, project):

manifest = get_manifest()
node = manifest.nodes["model.test.model_a"]
assert node.refs == [["model_a"]]
assert node.refs == [["model_b"]]
assert node.sources == [["my_src", "my_tbl"]]
assert node.config._extra == {"x": True}
assert node.config.tags == ["hello", "world"]
Expand Down

0 comments on commit c445ec0

Please sign in to comment.