From a73a39d4d7114f9ad3b0f40288bb35758f83c356 Mon Sep 17 00:00:00 2001 From: Ben Cassell Date: Fri, 27 Sep 2024 12:51:24 -0700 Subject: [PATCH] trying to make python test more reliable --- tests/functional/adapter/python_model/fixtures.py | 2 +- tests/functional/adapter/python_model/test_python_model.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/functional/adapter/python_model/fixtures.py b/tests/functional/adapter/python_model/fixtures.py index de7b9b67..473559d7 100644 --- a/tests/functional/adapter/python_model/fixtures.py +++ b/tests/functional/adapter/python_model/fixtures.py @@ -101,7 +101,7 @@ def model(dbt, spark): config: marterialized: table tags: ["python"] - location_root: '{{ env_var("DBT_DATABRICKS_LOCATION_ROOT") }}' + location_root: '{{ env_var("DBT_DATABRICKS_LOCATION_ROOT") }}/{schema}' columns: - name: date tests: diff --git a/tests/functional/adapter/python_model/test_python_model.py b/tests/functional/adapter/python_model/test_python_model.py index 87f8a4a9..dbb84923 100644 --- a/tests/functional/adapter/python_model/test_python_model.py +++ b/tests/functional/adapter/python_model/test_python_model.py @@ -119,6 +119,13 @@ def project_config_update(self): } def test_expected_handling_of_complex_config(self, project): + unformatted_schema_yml = util.read_file("models", "schema.yml") + util.write_file( + unformatted_schema_yml.format(schema=project.test_schema), + "models", + "schema.yml", + ) + util.run_dbt(["seed"]) util.run_dbt(["build", "-s", "complex_config"]) util.run_dbt(["build", "-s", "complex_config"])