Skip to content

Commit 2569dbe

Browse files
committed
[dagster-dbt] Refactor UnitTestDefinition instantiation in utils.py to use from_dict method
Verified `test_dbt_with_unit_tests()` passes with both "fqn:*" and "tag:test" selectors. Updated the instantiation of UnitTestDefinition in the __getattr__ method to utilize the from_dict method instead of the constructor. This change enhances the clarity and consistency of the code when handling unit test nodes from the manifest JSON. Fixed: dagster-io#27007
1 parent 7b439c1 commit 2569dbe

File tree

1 file changed

+1
-1
lines changed
  • python_modules/libraries/dagster-dbt/dagster_dbt

1 file changed

+1
-1
lines changed

python_modules/libraries/dagster-dbt/dagster_dbt/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __getattr__(self, item):
5151
{
5252
"unit_tests": {
5353
# unit test nodes must be of type UnitTestDefinition
54-
unique_id: UnitTestDefinition(**info)
54+
unique_id: UnitTestDefinition.from_dict(info)
5555
for unique_id, info in manifest_json["unit_tests"].items()
5656
},
5757
}

0 commit comments

Comments
 (0)