ephraimbuddy commented on code in PR #65313:
URL: https://github.com/apache/airflow/pull/65313#discussion_r3100914650
##########
airflow-core/tests/unit/dag_processing/test_processor.py:
##########
@@ -702,6 +699,42 @@ def test_import_error_updates_timestamps(session):
assert stat.import_errors == 1
+def test_persist_parsing_result_calls_update_db():
+ """persist_parsing_result should delegate to
update_dag_parsing_results_in_db with transformed args."""
+ parsing_result = DagFileParsingResult(
+ fileloc="test.py",
+ serialized_dags=[],
+ import_errors={"dags/broken.py": "SyntaxError"},
+ warnings=[],
+ )
+
+ manager = MagicMock(spec=DagFileProcessorManager)
+ session = MagicMock()
+ # Call the real method on the mock instance
+ with patch(
Review Comment:
There's no session or method object being exercised here
--
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]