diff --git a/tests/functional/show/fixtures.py b/tests/functional/show/fixtures.py index 89b698abea8..1fc9b9fd797 100644 --- a/tests/functional/show/fixtures.py +++ b/tests/functional/show/fixtures.py @@ -37,7 +37,7 @@ models__sql_header = """ {% call set_sql_header(config) %} -set session time zone 'Asia/Kolkata'; +set session time zone '{{ var("timezone", "Europe/Paris") }}'; {%- endcall %} select current_setting('timezone') as timezone """ diff --git a/tests/functional/show/test_show.py b/tests/functional/show/test_show.py index 42bddb2ddee..1dc59c27cb9 100644 --- a/tests/functional/show/test_show.py +++ b/tests/functional/show/test_show.py @@ -167,9 +167,10 @@ def test_seed(self, project): class TestShowSqlHeader(ShowBase): def test_sql_header(self, project): - run_dbt(["build"]) - (_, log_output) = run_dbt_and_capture(["show", "--select", "sql_header"]) - assert "Asia/Kolkata" in log_output + run_dbt(["build", "--vars", "timezone: Asia/Kolkata"]) + (_, log_output) = run_dbt_and_capture( + ["show", "--select", "sql_header", "--vars", "timezone: Asia/Kolkata"] + ) class TestShowModelVersions: