From 8d839581b3c8b87c81f22ae6478edb1736a5357c Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Tue, 3 Feb 2026 08:21:22 +0100 Subject: [PATCH 1/5] Fix made in endpoints unit tests --- tests/unit/app/endpoints/test_feedback.py | 24 +++++++++++++++++------ tests/unit/app/endpoints/test_rags.py | 6 +++--- tests/unit/app/endpoints/test_tools.py | 22 ++++++++++----------- 3 files changed, 32 insertions(+), 20 deletions(-) diff --git a/tests/unit/app/endpoints/test_feedback.py b/tests/unit/app/endpoints/test_feedback.py index 10d05e96e..875798e50 100644 --- a/tests/unit/app/endpoints/test_feedback.py +++ b/tests/unit/app/endpoints/test_feedback.py @@ -35,7 +35,10 @@ def test_is_feedback_enabled(mocker: MockerFixture) -> None: mock_config = AppConfig() mock_config._configuration = mocker.Mock() mock_config._configuration.user_data_collection = UserDataCollection( - feedback_enabled=True, feedback_storage="/tmp" + feedback_enabled=True, + feedback_storage="/tmp", + transcripts_enabled=False, + transcripts_storage=None, ) mocker.patch("app.endpoints.feedback.configuration", mock_config) assert is_feedback_enabled() is True, "Feedback should be enabled" @@ -46,7 +49,10 @@ def test_is_feedback_disabled(mocker: MockerFixture) -> None: mock_config = AppConfig() mock_config._configuration = mocker.Mock() mock_config._configuration.user_data_collection = UserDataCollection( - feedback_enabled=False, feedback_storage=None + feedback_enabled=False, + feedback_storage=None, + transcripts_enabled=False, + transcripts_storage=None, ) mocker.patch("app.endpoints.feedback.configuration", mock_config) assert is_feedback_enabled() is False, "Feedback should be disabled" @@ -338,7 +344,10 @@ def test_feedback_status_enabled(mocker: MockerFixture) -> None: mock_config = AppConfig() mock_config._configuration = mocker.Mock() mock_config._configuration.user_data_collection = UserDataCollection( - feedback_enabled=True, feedback_storage="/tmp" + feedback_enabled=True, + feedback_storage="/tmp", + transcripts_enabled=False, + transcripts_storage=None, ) mocker.patch("app.endpoints.feedback.configuration", mock_config) @@ -353,7 +362,10 @@ def test_feedback_status_disabled(mocker: MockerFixture) -> None: mock_config = AppConfig() mock_config._configuration = mocker.Mock() mock_config._configuration.user_data_collection = UserDataCollection( - feedback_enabled=False, feedback_storage=None + feedback_enabled=False, + feedback_storage=None, + transcripts_enabled=False, + transcripts_storage=None, ) mocker.patch("app.endpoints.feedback.configuration", mock_config) @@ -384,7 +396,7 @@ async def test_feedback_endpoint_handler_conversation_not_found( assert exc_info.value.status_code == status.HTTP_404_NOT_FOUND detail = exc_info.value.detail assert isinstance(detail, dict) - assert detail["response"] == "Conversation not found" + assert detail["response"] == "Conversation not found" # type: ignore[index] @pytest.mark.asyncio @@ -414,4 +426,4 @@ async def test_feedback_endpoint_handler_conversation_wrong_owner( assert exc_info.value.status_code == status.HTTP_403_FORBIDDEN detail = exc_info.value.detail assert isinstance(detail, dict) - assert "does not have permission" in detail["response"] + assert "does not have permission" in detail["response"] # type: ignore[index] diff --git a/tests/unit/app/endpoints/test_rags.py b/tests/unit/app/endpoints/test_rags.py index c79365a28..d06ca508f 100644 --- a/tests/unit/app/endpoints/test_rags.py +++ b/tests/unit/app/endpoints/test_rags.py @@ -56,7 +56,7 @@ async def test_rags_endpoint_connection_error( detail = e.value.detail assert isinstance(detail, dict) assert "response" in detail - assert "Unable to connect to Llama Stack" in detail["response"] + assert "Unable to connect to Llama Stack" in detail["response"] # type: ignore[index] @pytest.mark.asyncio @@ -158,7 +158,7 @@ async def test_rag_info_endpoint_rag_not_found( detail = e.value.detail assert isinstance(detail, dict) assert "response" in detail - assert "Rag not found" in detail["response"] + assert "Rag not found" in detail["response"] # type: ignore[index] @pytest.mark.asyncio @@ -186,7 +186,7 @@ async def test_rag_info_endpoint_connection_error( detail = e.value.detail assert isinstance(detail, dict) assert "response" in detail - assert "Unable to connect to Llama Stack" in detail["response"] + assert "Unable to connect to Llama Stack" in detail["response"] # type: ignore[index] @pytest.mark.asyncio diff --git a/tests/unit/app/endpoints/test_tools.py b/tests/unit/app/endpoints/test_tools.py index 7138bc7a8..9ec8db3df 100644 --- a/tests/unit/app/endpoints/test_tools.py +++ b/tests/unit/app/endpoints/test_tools.py @@ -125,7 +125,7 @@ async def test_tools_endpoint_success( mocker.patch("app.endpoints.tools.configuration", app_config) # Mock authorization decorator to bypass i - mocker.patch("app.endpoints.tools.authorize", lambda action: lambda func: func) + mocker.patch("app.endpoints.tools.authorize", lambda _: lambda func: func) # Mock client holder and clien mock_client_holder = mocker.patch("app.endpoints.tools.AsyncLlamaStackClientHolder") @@ -192,7 +192,7 @@ async def test_tools_endpoint_no_mcp_servers(mocker: MockerFixture) -> None: mocker.patch("app.endpoints.tools.configuration", app_config) # Mock authorization decorator to bypass i - mocker.patch("app.endpoints.tools.authorize", lambda action: lambda func: func) + mocker.patch("app.endpoints.tools.authorize", lambda _: lambda func: func) # Mock client holder and clien mock_client_holder = mocker.patch("app.endpoints.tools.AsyncLlamaStackClientHolder") @@ -228,7 +228,7 @@ async def test_tools_endpoint_api_connection_error( mocker.patch("app.endpoints.tools.configuration", app_config) # Mock authorization decorator to bypass i - mocker.patch("app.endpoints.tools.authorize", lambda action: lambda func: func) + mocker.patch("app.endpoints.tools.authorize", lambda _: lambda func: func) # Mock client holder and clien mock_client_holder = mocker.patch("app.endpoints.tools.AsyncLlamaStackClientHolder") @@ -270,7 +270,7 @@ async def test_tools_endpoint_partial_failure( # pylint: disable=redefined-oute app_config._configuration = mock_configuration mocker.patch("app.endpoints.tools.configuration", app_config) - mocker.patch("app.endpoints.tools.authorize", lambda action: lambda func: func) + mocker.patch("app.endpoints.tools.authorize", lambda _: lambda func: func) mock_client_holder = mocker.patch("app.endpoints.tools.AsyncLlamaStackClientHolder") mock_client = mocker.AsyncMock() mock_client_holder.return_value.get_client.return_value = mock_client @@ -309,7 +309,7 @@ async def test_tools_endpoint_toolgroup_not_found( # pylint: disable=redefined- mocker.patch("app.endpoints.tools.configuration", app_config) # Mock authorization decorator to bypass i - mocker.patch("app.endpoints.tools.authorize", lambda action: lambda func: func) + mocker.patch("app.endpoints.tools.authorize", lambda _: lambda func: func) # Mock client holder and clien mock_client_holder = mocker.patch("app.endpoints.tools.AsyncLlamaStackClientHolder") @@ -365,7 +365,7 @@ async def test_tools_endpoint_builtin_toolgroup( mocker.patch("app.endpoints.tools.configuration", app_config) # Mock authorization decorator to bypass i - mocker.patch("app.endpoints.tools.authorize", lambda action: lambda func: func) + mocker.patch("app.endpoints.tools.authorize", lambda _: lambda func: func) # Mock client holder and clien mock_client_holder = mocker.patch("app.endpoints.tools.AsyncLlamaStackClientHolder") @@ -432,7 +432,7 @@ async def test_tools_endpoint_mixed_toolgroups(mocker: MockerFixture) -> None: mocker.patch("app.endpoints.tools.configuration", app_config) # Mock authorization decorator to bypass i - mocker.patch("app.endpoints.tools.authorize", lambda action: lambda func: func) + mocker.patch("app.endpoints.tools.authorize", lambda _: lambda func: func) # Mock client holder and clien mock_client_holder = mocker.patch("app.endpoints.tools.AsyncLlamaStackClientHolder") @@ -512,7 +512,7 @@ async def test_tools_endpoint_value_attribute_error( mocker.patch("app.endpoints.tools.configuration", app_config) # Mock authorization decorator to bypass i - mocker.patch("app.endpoints.tools.authorize", lambda action: lambda func: func) + mocker.patch("app.endpoints.tools.authorize", lambda _: lambda func: func) # Mock client holder and clien mock_client_holder = mocker.patch("app.endpoints.tools.AsyncLlamaStackClientHolder") @@ -542,7 +542,7 @@ async def test_tools_endpoint_apiconnection_error_toolgroups( # pylint: disable mocker.patch("app.endpoints.tools.configuration", app_config) # Mock authorization decorator to bypass i - mocker.patch("app.endpoints.tools.authorize", lambda action: lambda func: func) + mocker.patch("app.endpoints.tools.authorize", lambda _: lambda func: func) # Mock client holder and clien mock_client_holder = mocker.patch("app.endpoints.tools.AsyncLlamaStackClientHolder") @@ -579,7 +579,7 @@ async def test_tools_endpoint_client_holder_apiconnection_error( # pylint: disa mocker.patch("app.endpoints.tools.configuration", app_config) # Mock authorization decorator to bypass i - mocker.patch("app.endpoints.tools.authorize", lambda action: lambda func: func) + mocker.patch("app.endpoints.tools.authorize", lambda _: lambda func: func) # Mock client holder to raise APIConnectionError mock_client_holder = mocker.patch("app.endpoints.tools.AsyncLlamaStackClientHolder") @@ -613,7 +613,7 @@ async def test_tools_endpoint_general_exception( mocker.patch("app.endpoints.tools.configuration", app_config) # Mock authorization decorator to bypass i - mocker.patch("app.endpoints.tools.authorize", lambda action: lambda func: func) + mocker.patch("app.endpoints.tools.authorize", lambda _: lambda func: func) # Mock client holder to raise exception mock_client_holder = mocker.patch("app.endpoints.tools.AsyncLlamaStackClientHolder") From 1856295f8ac25841fe5cca8744e1a5d7aada5a1a Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Tue, 3 Feb 2026 08:21:41 +0100 Subject: [PATCH 2/5] Fix made in endpoints modes tests --- .../unit/models/config/test_authentication_configuration.py | 5 +++++ tests/unit/models/config/test_llama_stack_configuration.py | 2 ++ tests/unit/models/responses/test_successful_responses.py | 1 + tests/unit/models/rlsapi/test_requests.py | 2 +- tests/unit/models/rlsapi/test_responses.py | 4 +++- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/unit/models/config/test_authentication_configuration.py b/tests/unit/models/config/test_authentication_configuration.py index d7ae357d5..5e99f3aa2 100644 --- a/tests/unit/models/config/test_authentication_configuration.py +++ b/tests/unit/models/config/test_authentication_configuration.py @@ -309,6 +309,7 @@ def test_authentication_configuration_in_config_noop() -> None: library_client_config_path="tests/configuration/run.yaml", url="localhost", api_key=SecretStr(""), + timeout=60, ), user_data_collection=UserDataCollection( feedback_enabled=False, @@ -347,6 +348,7 @@ def test_authentication_configuration_skip_readiness_probe() -> None: library_client_config_path="tests/configuration/run.yaml", url="localhost", api_key=SecretStr(""), + timeout=60, ), user_data_collection=UserDataCollection( feedback_enabled=False, @@ -393,6 +395,7 @@ def test_authentication_configuration_in_config_k8s() -> None: library_client_config_path="tests/configuration/run.yaml", url="localhost", api_key=SecretStr(""), + timeout=60, ), user_data_collection=UserDataCollection( feedback_enabled=False, @@ -449,6 +452,7 @@ def test_authentication_configuration_in_config_rh_identity() -> None: library_client_config_path="tests/configuration/run.yaml", url="localhost", api_key=SecretStr(""), + timeout=60, ), user_data_collection=UserDataCollection( feedback_enabled=False, @@ -495,6 +499,7 @@ def test_authentication_configuration_in_config_jwktoken() -> None: library_client_config_path="tests/configuration/run.yaml", url="localhost", api_key=SecretStr(""), + timeout=60, ), user_data_collection=UserDataCollection( feedback_enabled=False, diff --git a/tests/unit/models/config/test_llama_stack_configuration.py b/tests/unit/models/config/test_llama_stack_configuration.py index 0d6aa489a..4d8465b4c 100644 --- a/tests/unit/models/config/test_llama_stack_configuration.py +++ b/tests/unit/models/config/test_llama_stack_configuration.py @@ -18,6 +18,7 @@ def test_llama_stack_configuration_constructor() -> None: library_client_config_path="tests/configuration/run.yaml", url=None, api_key=None, + timeout=60, ) assert llama_stack_configuration is not None @@ -26,6 +27,7 @@ def test_llama_stack_configuration_constructor() -> None: url="http://localhost", library_client_config_path=None, api_key=None, + timeout=60, ) assert llama_stack_configuration is not None diff --git a/tests/unit/models/responses/test_successful_responses.py b/tests/unit/models/responses/test_successful_responses.py index 117102e30..996b98f46 100644 --- a/tests/unit/models/responses/test_successful_responses.py +++ b/tests/unit/models/responses/test_successful_responses.py @@ -948,6 +948,7 @@ def test_constructor(self) -> None: use_as_library_client=False, api_key=None, library_client_config_path=None, + timeout=60, ), user_data_collection=UserDataCollection( feedback_enabled=False, diff --git a/tests/unit/models/rlsapi/test_requests.py b/tests/unit/models/rlsapi/test_requests.py index 0b72a1a53..f6d03071b 100644 --- a/tests/unit/models/rlsapi/test_requests.py +++ b/tests/unit/models/rlsapi/test_requests.py @@ -150,7 +150,7 @@ def test_constructor_with_values(self) -> None: os="RHEL", version="9.3", arch="x86_64", - system_id="machine-001", + system_id="machine-001", # pyright: ignore[reportCallIssue] ) assert sysinfo.os == "RHEL" assert sysinfo.version == "9.3" diff --git a/tests/unit/models/rlsapi/test_responses.py b/tests/unit/models/rlsapi/test_responses.py index 1de1886e9..450fee781 100644 --- a/tests/unit/models/rlsapi/test_responses.py +++ b/tests/unit/models/rlsapi/test_responses.py @@ -77,7 +77,9 @@ class TestRlsapiV1InferData: def test_constructor_minimal(self) -> None: """Test RlsapiV1InferData with only required field.""" - data = RlsapiV1InferData(text="Response text here") + data = RlsapiV1InferData( + text="Response text here" + ) # pyright: ignore[reportCallIssue] assert data.text == "Response text here" assert data.request_id is None From a077810c61321ca8a5b519bc990385f09cc262d3 Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Tue, 3 Feb 2026 08:21:53 +0100 Subject: [PATCH 3/5] Fix made in cache unit tests --- tests/unit/cache/test_cache_factory.py | 22 +++++++++++++--------- tests/unit/cache/test_postgres_cache.py | 6 +++--- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/tests/unit/cache/test_cache_factory.py b/tests/unit/cache/test_cache_factory.py index 06aeb772f..64f8293ba 100644 --- a/tests/unit/cache/test_cache_factory.py +++ b/tests/unit/cache/test_cache_factory.py @@ -37,7 +37,9 @@ def noop_cache_config() -> ConversationHistoryConfiguration: Returns: ConversationHistoryConfiguration: configuration instance with `type` set to CACHE_TYPE_NOOP """ - return ConversationHistoryConfiguration(type=CACHE_TYPE_NOOP) + return ConversationHistoryConfiguration( + type=CACHE_TYPE_NOOP + ) # pyright: ignore[reportCallIssue] @pytest.fixture(scope="module", name="memory_cache_config_fixture") @@ -53,7 +55,7 @@ def memory_cache_config() -> ConversationHistoryConfiguration: """ return ConversationHistoryConfiguration( type=CACHE_TYPE_MEMORY, memory=InMemoryCacheConfig(max_entries=10) - ) + ) # pyright: ignore[reportCallIssue] @pytest.fixture(scope="module", name="postgres_cache_config_fixture") @@ -72,7 +74,7 @@ def postgres_cache_config() -> ConversationHistoryConfiguration: type=CACHE_TYPE_POSTGRES, postgres=PostgreSQLDatabaseConfiguration( db="database", user="user", password=SecretStr("password") - ), + ), # pyright: ignore[reportCallIssue], ) @@ -95,7 +97,7 @@ def sqlite_cache_config(tmpdir: Path) -> ConversationHistoryConfiguration: db_path = str(tmpdir / "test.sqlite") return ConversationHistoryConfiguration( type=CACHE_TYPE_SQLITE, sqlite=SQLiteDatabaseConfiguration(db_path=db_path) - ) + ) # pyright: ignore[reportCallIssue] @pytest.fixture(scope="module", name="invalid_cache_type_config_fixture") @@ -108,7 +110,7 @@ def invalid_cache_type_config() -> ConversationHistoryConfiguration: Returns: ConversationHistoryConfiguration: configuration with `type` set to "foo bar baz". """ - c = ConversationHistoryConfiguration() + c = ConversationHistoryConfiguration() # pyright: ignore[reportCallIssue] # the conversation cache type name is incorrect in purpose c.type = "foo bar baz" # pyright: ignore return c @@ -138,7 +140,7 @@ def test_conversation_cache_in_memory_improper_config() -> None: """Check if memory cache configuration is checked in cache factory.""" cc = ConversationHistoryConfiguration( type=CACHE_TYPE_MEMORY, memory=InMemoryCacheConfig(max_entries=10) - ) + ) # pyright: ignore[reportCallIssue] # simulate improper configuration (can not be done directly as model checks this) cc.memory = None with pytest.raises(ValueError, match="Expecting configuration for in-memory cache"): @@ -168,7 +170,7 @@ def test_conversation_cache_sqlite_improper_config(tmpdir: Path) -> None: db_path = str(tmpdir / "test.sqlite") cc = ConversationHistoryConfiguration( type=CACHE_TYPE_SQLITE, sqlite=SQLiteDatabaseConfiguration(db_path=db_path) - ) + ) # pyright: ignore[reportCallIssue] # simulate improper configuration (can not be done directly as model checks this) cc.sqlite = None with pytest.raises(ValueError, match="Expecting configuration for SQLite cache"): @@ -201,7 +203,7 @@ def test_conversation_cache_postgres_improper_config() -> None: type=CACHE_TYPE_POSTGRES, postgres=PostgreSQLDatabaseConfiguration( db="db", user="u", password=SecretStr("p") - ), + ), # pyright: ignore[reportCallIssue] ) # simulate improper configuration (can not be done directly as model checks this) cc.postgres = None @@ -220,7 +222,9 @@ def test_conversation_cache_no_type() -> None: whose `type` is None raises a ValueError with message "Cache type must be set". """ - cc = ConversationHistoryConfiguration(type=CACHE_TYPE_NOOP) + cc = ConversationHistoryConfiguration( + type=CACHE_TYPE_NOOP + ) # pyright: ignore[reportCallIssue] # simulate improper configuration (can not be done directly as model checks this) cc.type = None with pytest.raises(ValueError, match="Cache type must be set"): diff --git a/tests/unit/cache/test_postgres_cache.py b/tests/unit/cache/test_postgres_cache.py index 7b77170c2..0b4a3011c 100644 --- a/tests/unit/cache/test_postgres_cache.py +++ b/tests/unit/cache/test_postgres_cache.py @@ -104,7 +104,7 @@ def postgres_cache_config() -> PostgreSQLDatabaseConfiguration: db="database", user="user", password=SecretStr("password"), - ) + ) # pyright: ignore[reportCallIssue] @pytest.fixture(scope="module", name="postgres_cache_config_fixture_wrong_namespace") @@ -129,7 +129,7 @@ def postgres_cache_config_wrong_namespace() -> PostgreSQLDatabaseConfiguration: user="user", password=SecretStr("password"), namespace="foo bar baz", - ) + ) # pyright: ignore[reportCallIssue] @pytest.fixture(scope="module", name="postgres_cache_config_fixture_too_long_namespace") @@ -154,7 +154,7 @@ def postgres_cache_config_too_long_namespace() -> PostgreSQLDatabaseConfiguratio user="user", password=SecretStr("password"), namespace="too long namespace that is longer than allowed 63 characters limit", - ) + ) # pyright: ignore[reportCallIssue] def test_cache_initialization( From 84dc76cc0ee1386e8552e59ebedb93284207aa38 Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Tue, 3 Feb 2026 08:22:06 +0100 Subject: [PATCH 4/5] Fix made in authentication unit tests --- tests/unit/authentication/test_api_key_token.py | 4 ++-- tests/unit/authentication/test_jwk_token.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/authentication/test_api_key_token.py b/tests/unit/authentication/test_api_key_token.py index b16be1959..b6998807a 100644 --- a/tests/unit/authentication/test_api_key_token.py +++ b/tests/unit/authentication/test_api_key_token.py @@ -80,7 +80,7 @@ async def test_api_key_with_token_auth_dependency_no_token( assert exc_info.value.status_code == 401 detail = exc_info.value.detail assert isinstance(detail, dict) - assert detail["cause"] == "No Authorization header found" + assert detail["cause"] == "No Authorization header found" # type: ignore[index] async def test_api_key_with_token_auth_dependency_no_bearer( @@ -105,7 +105,7 @@ async def test_api_key_with_token_auth_dependency_no_bearer( assert exc_info.value.status_code == 401 detail = exc_info.value.detail assert isinstance(detail, dict) - assert detail["cause"] == "No token found in Authorization header" + assert detail["cause"] == "No token found in Authorization header" # type: ignore[index] async def test_api_key_with_token_auth_dependency_invalid( diff --git a/tests/unit/authentication/test_jwk_token.py b/tests/unit/authentication/test_jwk_token.py index 48763d952..221208cd1 100644 --- a/tests/unit/authentication/test_jwk_token.py +++ b/tests/unit/authentication/test_jwk_token.py @@ -215,7 +215,7 @@ def default_jwk_configuration() -> JwkConfiguration: jwt_configuration=JwtConfiguration( # Should default to: # user_id_claim="user_id", username_claim="username" - ), + ), # pyright: ignore[reportCallIssue] ) From b2d36da5066585446b0bb80dc2013390146c8e3a Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Tue, 3 Feb 2026 08:22:26 +0100 Subject: [PATCH 5/5] Fix made in test_client.py --- tests/unit/test_client.py | 6 ++++++ tests/unit/utils/test_common.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py index 435d3b469..090309e37 100644 --- a/tests/unit/test_client.py +++ b/tests/unit/test_client.py @@ -38,6 +38,7 @@ async def test_get_async_llama_stack_library_client() -> None: api_key=None, use_as_library_client=True, library_client_config_path="./tests/configuration/minimal-stack.yaml", + timeout=60, ) client = AsyncLlamaStackClientHolder() await client.load(cfg) @@ -57,6 +58,7 @@ async def test_get_async_llama_stack_remote_client() -> None: api_key=None, use_as_library_client=False, library_client_config_path="./tests/configuration/minimal-stack.yaml", + timeout=60, ) client = AsyncLlamaStackClientHolder() await client.load(cfg) @@ -73,6 +75,7 @@ async def test_get_async_llama_stack_wrong_configuration() -> None: api_key=None, use_as_library_client=True, library_client_config_path="./tests/configuration/minimal-stack.yaml", + timeout=60, ) cfg.library_client_config_path = None with pytest.raises( @@ -91,6 +94,7 @@ async def test_update_provider_data_service_client() -> None: api_key=None, use_as_library_client=False, library_client_config_path=None, + timeout=60, ) holder = AsyncLlamaStackClientHolder() await holder.load(cfg) @@ -122,6 +126,7 @@ async def test_update_provider_data_service_client() -> None: "X-LlamaStack-Provider-Data" ) assert provider_data_json is not None + assert isinstance(provider_data_json, str) provider_data = json.loads(provider_data_json) # Existing fields preserved, new fields updated @@ -138,6 +143,7 @@ async def test_reload_library_client() -> None: api_key=None, use_as_library_client=True, library_client_config_path="./tests/configuration/minimal-stack.yaml", + timeout=60, ) holder = AsyncLlamaStackClientHolder() await holder.load(cfg) diff --git a/tests/unit/utils/test_common.py b/tests/unit/utils/test_common.py index dd12692cf..39d343e2f 100644 --- a/tests/unit/utils/test_common.py +++ b/tests/unit/utils/test_common.py @@ -43,6 +43,7 @@ async def test_register_mcp_servers_empty_list(mocker: MockerFixture) -> None: url="http://localhost:8321", library_client_config_path=None, api_key=None, + timeout=60, ), user_data_collection=UserDataCollection( feedback_enabled=False, @@ -103,6 +104,7 @@ async def test_register_mcp_servers_single_server_not_registered( url="http://localhost:8321", library_client_config_path=None, api_key=None, + timeout=60, ), user_data_collection=UserDataCollection( feedback_enabled=False, @@ -165,6 +167,7 @@ async def test_register_mcp_servers_single_server_already_registered( url="http://localhost:8321", library_client_config_path=None, api_key=None, + timeout=60, ), user_data_collection=UserDataCollection( feedback_enabled=False, @@ -236,6 +239,7 @@ async def test_register_mcp_servers_multiple_servers_mixed_registration( url="http://localhost:8321", library_client_config_path=None, api_key=None, + timeout=60, ), user_data_collection=UserDataCollection( feedback_enabled=False, @@ -306,6 +310,7 @@ async def test_register_mcp_servers_with_custom_provider(mocker: MockerFixture) url="http://localhost:8321", library_client_config_path=None, api_key=None, + timeout=60, ), user_data_collection=UserDataCollection( feedback_enabled=False, @@ -376,6 +381,7 @@ async def test_register_mcp_servers_async_with_library_client( library_client_config_path="tests/configuration/run.yaml", url=None, api_key=None, + timeout=60, ), user_data_collection=UserDataCollection( feedback_enabled=False,