Skip to content

Commit 59e91de

Browse files
committed
PR feedback: revert sushi_dbt modifications, use tests/fixtures/dbt instead
1 parent 3a1e15f commit 59e91de

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
{{ check_model_is_table(model) }}
2-
3-
{% if 'DISTINCT' in model.raw_code %}
4-
{{ check_model_is_table_alt(model) }}
5-
{% endif %}
6-
71
SELECT DISTINCT
82
customer_id::INT AS customer_id
93
FROM {{ ref('orders') }} as o

tests/core/test_context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,8 +1534,8 @@ def test_plan_enable_preview_default(sushi_context: Context, sushi_dbt_context:
15341534
assert sushi_dbt_context._plan_preview_enabled
15351535

15361536

1537-
def test_raw_code_missing_from_model_attributes(sushi_dbt_context: Context):
1538-
customers_model = sushi_dbt_context.models['"memory"."sushi"."customers"']
1537+
def test_raw_code_missing_from_model_attributes(sushi_test_dbt_context: Context):
1538+
customers_model = sushi_test_dbt_context.models['"memory"."sushi"."simple_model_a"']
15391539
assert "raw_code" not in customers_model.jinja_macros.global_objs["model"] # type: ignore
15401540

15411541

examples/sushi_dbt/macros/check_model_is_table.sql renamed to tests/fixtures/dbt/sushi_test/macros/check_model_is_table.sql

File renamed without changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
{{ check_model_is_table(model) }}
2+
3+
{% if 'SELECT' in model.raw_code %}
4+
{{ check_model_is_table_alt(model) }}
5+
{% endif %}
16

27
SELECT 1 AS a

0 commit comments

Comments
 (0)