diff --git a/core/dbt/parser/unit_tests.py b/core/dbt/parser/unit_tests.py index 72af226d5d7..ce2e63a8b08 100644 --- a/core/dbt/parser/unit_tests.py +++ b/core/dbt/parser/unit_tests.py @@ -165,7 +165,7 @@ def parse_unit_test_case(self, test_case: UnitTestDefinition): if original_input_node.latest_version: input_node.latest_version = original_input_node.latest_version - elif original_input_node.resource_type == NodeType.Source: + elif resource_type == NodeType.Source: # We are reusing the database/schema/identifier from the original source, # but that shouldn't matter since this acts as an ephemeral model which just # wraps a CTE around the unit test node.