@@ -45,7 +45,7 @@ def test_interactive_mode(
4545 mock_user_input .assert_called_with ("\n ~ " , default = "" , keyboard_interrupt_return_default = False )
4646
4747 # Verify user input was processed
48- mock_agent .assert_called_with ("test query" , system_prompt = mock . ANY )
48+ mock_agent .assert_called_with ("test query" )
4949
5050 # Verify goodbye message was rendered
5151 mock_goodbye_message .assert_called_once ()
@@ -395,13 +395,9 @@ def test_welcome_message_with_kb(
395395 with mock .patch .object (strands , "render_welcome_message" ), mock .patch .object (strands , "render_goodbye_message" ):
396396 strands .main ()
397397
398- # Extract the system_prompt from the agent call
399- call_args , call_kwargs = mock_agent .call_args
400- system_prompt = call_kwargs .get ("system_prompt" )
401-
402398 # Verify system prompt includes both base prompt and welcome text
403- assert base_system_prompt in system_prompt
404- assert "Custom welcome text" in system_prompt
399+ assert base_system_prompt in mock_agent . system_prompt
400+ assert "Custom welcome text" in mock_agent . system_prompt
405401
406402 def test_welcome_message_failure (
407403 self ,
@@ -430,10 +426,5 @@ def test_welcome_message_failure(
430426 with mock .patch .object (strands , "render_welcome_message" ), mock .patch .object (strands , "render_goodbye_message" ):
431427 strands .main ()
432428
433- # Verify agent was called with system prompt that includes welcome text reference
434- # Even with error status, the code adds a "Welcome Text Reference:" section (just empty)
435- expected_system_prompt = f"{ base_system_prompt } \n \n Welcome Text Reference:\n "
436- call_args , call_kwargs = mock_agent .call_args
437- system_prompt = call_kwargs .get ("system_prompt" )
438-
439- assert system_prompt == expected_system_prompt
429+ # Verify agent was called with system prompt that excludes welcome text reference
430+ assert mock_agent .system_prompt == base_system_prompt
0 commit comments