pierrejeambrun commented on code in PR #75208:
URL: https://github.com/apache/airflow/pull/75208#discussion_r4351045425


##########
providers/common/ai/tests/unit/common/ai/conftest.py:
##########
@@ -104,6 +106,46 @@ def _make(output, *, cost=None):
     return _make
 
 
[email protected]
+def make_reporting_agent(make_mock_run_result):
+    """Factory fixture creating a mock agent whose run spends a known usage, 
as ``(agent, expected_pushes)``.
+
+    ``expected_pushes`` maps each XCom key the run must report (``usage``, 
``run_id``, and the
+    model name unless ``model_name`` is ``None``) to its value, for a task 
instance with id ``ti-1``.
+    """
+
+    def _make(output, *, model_name):
+        result = make_mock_run_result(output)
+        result.run_id = "ti-1"

Review Comment:
   done



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