Skip to content

Commit

Permalink
Fix calls to pre_model_hook which were apparently passing an object o…
Browse files Browse the repository at this point in the history
…f the wrong type.
  • Loading branch information
peterallenwebb committed Sep 18, 2024
1 parent ab500a9 commit a3fdee7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/dbt/task/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Check warning on line 130 in core/dbt/task/test.py

View check run for this annotation

Codecov / codecov/patch

core/dbt/task/test.py#L130

Added line #L130 was not covered by tests

materialization_macro = manifest.find_materialization_macro_by_name(
self.config.project_name, data_test.get_materialization(), self.adapter.type()
Expand Down Expand Up @@ -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"])

Check warning on line 208 in core/dbt/task/test.py

View check run for this annotation

Codecov / codecov/patch

core/dbt/task/test.py#L208

Added line #L208 was not covered by tests

materialization_macro = unit_test_manifest.find_materialization_macro_by_name(
self.config.project_name, unit_test_node.get_materialization(), self.adapter.type()
Expand Down

0 comments on commit a3fdee7

Please sign in to comment.