@@ -71,7 +71,7 @@ def test_call_activity_with_retry_delegates_and_records(self):
7171 @patch ('azure.durable_functions.openai_agents.context.function_schema' )
7272 @patch ('azure.durable_functions.openai_agents.context.FunctionTool' )
7373 def test_activity_as_tool_creates_function_tool (self , mock_function_tool , mock_function_schema ):
74- """Test that activity_as_tool creates a FunctionTool with correct parameters."""
74+ """Test that create_activity_tool creates a FunctionTool with correct parameters."""
7575 orchestration_context = self ._create_mock_orchestration_context ()
7676 task_tracker = self ._create_mock_task_tracker ()
7777
@@ -94,7 +94,7 @@ def test_activity_as_tool_creates_function_tool(self, mock_function_tool, mock_f
9494 ai_context = DurableAIAgentContext (orchestration_context , task_tracker , None )
9595 retry_options = RetryOptions (1000 , 3 )
9696
97- result = ai_context .activity_as_tool (
97+ result = ai_context .create_activity_tool (
9898 mock_activity_func ,
9999 description = "Custom description" ,
100100 retry_options = retry_options
@@ -124,7 +124,7 @@ def test_activity_as_tool_creates_function_tool(self, mock_function_tool, mock_f
124124 @patch ('azure.durable_functions.openai_agents.context.function_schema' )
125125 @patch ('azure.durable_functions.openai_agents.context.FunctionTool' )
126126 def test_activity_as_tool_with_default_retry_options (self , mock_function_tool , mock_function_schema ):
127- """Test that activity_as_tool uses default retry options when none provided."""
127+ """Test that create_activity_tool uses default retry options when none provided."""
128128 orchestration_context = self ._create_mock_orchestration_context ()
129129 task_tracker = self ._create_mock_task_tracker ()
130130
@@ -144,7 +144,7 @@ def test_activity_as_tool_with_default_retry_options(self, mock_function_tool, m
144144 ai_context = DurableAIAgentContext (orchestration_context , task_tracker , None )
145145
146146 # Call with default retry options
147- result = ai_context .activity_as_tool (mock_activity_func )
147+ result = ai_context .create_activity_tool (mock_activity_func )
148148
149149 # Should still create the tool successfully
150150 assert result is mock_tool
@@ -173,7 +173,7 @@ def test_activity_as_tool_run_activity_with_retry(self, mock_function_tool, mock
173173 ai_context = DurableAIAgentContext (orchestration_context , task_tracker , None )
174174 retry_options = RetryOptions (1000 , 3 )
175175
176- ai_context .activity_as_tool (mock_activity_func , retry_options = retry_options )
176+ ai_context .create_activity_tool (mock_activity_func , retry_options = retry_options )
177177
178178 # Get the run_activity function that was passed to FunctionTool
179179 call_args = mock_function_tool .call_args
@@ -214,7 +214,7 @@ def test_activity_as_tool_run_activity_without_retry(self, mock_function_tool, m
214214
215215 ai_context = DurableAIAgentContext (orchestration_context , task_tracker , None )
216216
217- ai_context .activity_as_tool (mock_activity_func , retry_options = None )
217+ ai_context .create_activity_tool (mock_activity_func , retry_options = None )
218218
219219 # Get the run_activity function that was passed to FunctionTool
220220 call_args = mock_function_tool .call_args
@@ -289,4 +289,4 @@ def test_dir_includes_delegated_attributes(self):
289289 assert 'is_replaying' in dir_result
290290 # Should also include public methods
291291 assert 'call_activity' in dir_result
292- assert 'activity_as_tool ' in dir_result
292+ assert 'create_activity_tool ' in dir_result
0 commit comments