Lee-W commented on code in PR #49164:
URL: https://github.com/apache/airflow/pull/49164#discussion_r2299646770


##########
airflow-core/tests/unit/api_fastapi/common/test_exceptions.py:
##########
@@ -282,3 +295,91 @@ def test_handle_multiple_columns_unique_constraint_error(
 
             assert response_detail == expected_detail
             assert "INSERT INTO dag_run" in actual_statement
+        assert exeinfo_response_error.value.detail == expected_exception.detail
+
+
+class TestDagErrorHandler:
+    dag_error_handler = DagErrorHandler()
+
+    def test_handle_deserialization_error_with_value_error(self):
+        error_message = "Missing Dag ID in serialized Dag"
+        deserialization_error = DeserializationError("test_dag_id")
+
+        value_error = ValueError(error_message)
+        deserialization_error.__cause__ = value_error
+
+        with pytest.raises(
+            HTTPException,

Review Comment:
   These few can probably be refactored using `pytest.mark.parametreize`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to