|
2 | 2 |
|
3 | 3 | import os |
4 | 4 | import pytest |
| 5 | +from pytest_mock import MockerFixture |
5 | 6 | from fastapi import HTTPException |
6 | 7 | from pydantic import AnyUrl |
7 | 8 |
|
@@ -245,7 +246,9 @@ def test_get_profile_prompt_with_enabled_query_system_prompt( |
245 | 246 |
|
246 | 247 |
|
247 | 248 | @pytest.mark.asyncio |
248 | | -async def test_get_agent_with_conversation_id(prepare_agent_mocks, mocker): |
| 249 | +async def test_get_agent_with_conversation_id( |
| 250 | + prepare_agent_mocks, mocker: MockerFixture |
| 251 | +): |
249 | 252 | """Test get_agent function when agent exists in llama stack.""" |
250 | 253 | mock_client, mock_agent = prepare_agent_mocks |
251 | 254 | conversation_id = "test_conversation_id" |
@@ -664,7 +667,9 @@ async def test_get_agent_no_tools_false_preserves_parser( |
664 | 667 |
|
665 | 668 |
|
666 | 669 | @pytest.mark.asyncio |
667 | | -async def test_get_temp_agent_basic_functionality(prepare_agent_mocks, mocker): |
| 670 | +async def test_get_temp_agent_basic_functionality( |
| 671 | + prepare_agent_mocks, mocker: MockerFixture |
| 672 | +): |
668 | 673 | """Test get_temp_agent function creates agent with correct parameters.""" |
669 | 674 | mock_client, mock_agent = prepare_agent_mocks |
670 | 675 | mock_agent.create_session.return_value = "temp_session_id" |
@@ -703,7 +708,9 @@ async def test_get_temp_agent_basic_functionality(prepare_agent_mocks, mocker): |
703 | 708 |
|
704 | 709 |
|
705 | 710 | @pytest.mark.asyncio |
706 | | -async def test_get_temp_agent_returns_valid_ids(prepare_agent_mocks, mocker): |
| 711 | +async def test_get_temp_agent_returns_valid_ids( |
| 712 | + prepare_agent_mocks, mocker: MockerFixture |
| 713 | +): |
707 | 714 | """Test get_temp_agent function returns valid agent_id and session_id.""" |
708 | 715 | mock_client, mock_agent = prepare_agent_mocks |
709 | 716 | mock_agent.agent_id = "generated_agent_id" |
@@ -736,7 +743,9 @@ async def test_get_temp_agent_returns_valid_ids(prepare_agent_mocks, mocker): |
736 | 743 |
|
737 | 744 |
|
738 | 745 | @pytest.mark.asyncio |
739 | | -async def test_get_temp_agent_no_persistence(prepare_agent_mocks, mocker): |
| 746 | +async def test_get_temp_agent_no_persistence( |
| 747 | + prepare_agent_mocks, mocker: MockerFixture |
| 748 | +): |
740 | 749 | """Test get_temp_agent function creates agent without session persistence.""" |
741 | 750 | mock_client, mock_agent = prepare_agent_mocks |
742 | 751 | mock_agent.create_session.return_value = "temp_session_id" |
@@ -818,7 +827,9 @@ def test_get_topic_summary_system_prompt_with_custom_profile(): |
818 | 827 | assert topic_summary_prompt == prompts.get("topic_summary") |
819 | 828 |
|
820 | 829 |
|
821 | | -def test_get_topic_summary_system_prompt_with_custom_profile_no_topic_summary(mocker): |
| 830 | +def test_get_topic_summary_system_prompt_with_custom_profile_no_topic_summary( |
| 831 | + mocker: MockerFixture, |
| 832 | +): |
822 | 833 | """Test that default topic summary prompt is returned when custom profile has |
823 | 834 | no topic_summary prompt. |
824 | 835 | """ |
|
0 commit comments