From 054c6fde37940820db8c469838b31b6e7f207dd2 Mon Sep 17 00:00:00 2001 From: Peter Webb Date: Wed, 18 Sep 2024 14:09:02 -0400 Subject: [PATCH] Fix calls to pre_model_hook which were apparently passing an object of the wrong type. (#10735) --- core/dbt/task/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/dbt/task/test.py b/core/dbt/task/test.py index f8b6b5964d7..0b1b56f8b22 100644 --- a/core/dbt/task/test.py +++ b/core/dbt/task/test.py @@ -127,7 +127,7 @@ def before_execute(self) -> None: def execute_data_test(self, data_test: TestNode, manifest: Manifest) -> TestResultData: context = generate_runtime_model_context(data_test, self.config, manifest) - hook_ctx = self.adapter.pre_model_hook(context) + hook_ctx = self.adapter.pre_model_hook(context["config"]) materialization_macro = manifest.find_materialization_macro_by_name( self.config.project_name, data_test.get_materialization(), self.adapter.type() @@ -205,7 +205,7 @@ def execute_unit_test( # materialization, not compile the node.compiled_code context = generate_runtime_model_context(unit_test_node, self.config, unit_test_manifest) - hook_ctx = self.adapter.pre_model_hook(context) + hook_ctx = self.adapter.pre_model_hook(context["config"]) materialization_macro = unit_test_manifest.find_materialization_macro_by_name( self.config.project_name, unit_test_node.get_materialization(), self.adapter.type()