Codingaditya17 commented on code in PR #67550:
URL: https://github.com/apache/airflow/pull/67550#discussion_r3342259507


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_import_error.py:
##########
@@ -410,6 +410,41 @@ def test_should_raises_403_unauthorized(self, 
unauthorized_test_client):
         response = unauthorized_test_client.get("/importErrors")
         assert response.status_code == 403
 
+    
@mock.patch("airflow.api_fastapi.core_api.routes.public.import_error.get_auth_manager")

Review Comment:
   Added the requested regression coverage in `b718210b05`.
   
   The new test creates two import-error files where the first file maps to 
multiple DAG rows, then calls the endpoint with `limit=1`, `offset=1`, and 
`order_by=id`. It asserts that the response returns the second import-error 
object, which confirms pagination is applied to distinct import-error objects 
instead of joined DAG rows.
   
   Local validation:
   
   `uv run pytest 
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_import_error.py::TestGetImportErrors::test_pagination_applies_to_distinct_import_errors_not_joined_dag_rows
 -q`
   
   Result: `1 passed, 1 warning`
   
   `uv run pytest 
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_import_error.py 
-q`
   
   Result: `33 passed, 1 warning`
   
   `uv run prek run --files 
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_import_error.py`
   
   Result: passed/skipped with no failures.



-- 
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