From e9e0a7d33c371f4f68f265d9512ce1557188295c Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Mon, 14 Oct 2024 14:29:30 +0100 Subject: [PATCH] Narrow scope of node_status test --- tests/functional/adapter/hooks/test_on_run_hooks.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/functional/adapter/hooks/test_on_run_hooks.py b/tests/functional/adapter/hooks/test_on_run_hooks.py index 9ba1e45c299..42edbdae970 100644 --- a/tests/functional/adapter/hooks/test_on_run_hooks.py +++ b/tests/functional/adapter/hooks/test_on_run_hooks.py @@ -1,6 +1,7 @@ import pytest from dbt.artifacts.schemas.results import RunStatus +from dbt.contracts.graph.nodes import HookNode from dbt.tests.util import get_artifact, run_dbt_and_capture @@ -50,8 +51,10 @@ def test_results(self, project, log_counts, my_model_run_status): assert [(result.node.unique_id, result.status) for result in results] == expected_results assert [ - (result.node.unique_id, result.node.node_info["node_status"]) for result in results - ] == [(id, str(status)) for id, status in expected_results] + (result.node.unique_id, result.node.node_info["node_status"]) + for result in results + if isinstance(result.node, HookNode) + ] == [(id, str(status)) for id, status in expected_results if id.startswith("operation")] assert log_counts in log_output assert "4 project hooks, 1 view model" in log_output