Skip to content

test: replace Mock() with unbound_session in test_app_package_service - #45162

Merged
asukaminato0721 merged 2 commits into
langgenius:mainfrom
xiaowxing:fix/mock-session-test-app-package-service
Oct 30, 2026
Merged

asukaminato0721 merged 2 commits into
langgenius:mainfrom
xiaowxing:fix/mock-session-test-app-package-service

Conversation

@xiaowxing

Copy link
Copy Markdown
Contributor

Summary

Replace session=Mock() with the unbound_session fixture in three test methods in test_app_package_service.py that call collect_icon().

The mocked session is only passed through to a mocked _upload_files() method and never touches the DB, so unbound_session is the appropriate fixture to use.

This is part of the effort tracked in issue #44973 to migrate unit tests away from mock SQLAlchemy sessions to real SQLite-backed or unbound session fixtures.

Changes

  • test_app_package_restores_independent_site_image_icon: Added unbound_session: Session parameter, replaced 2 session=Mock() calls
  • test_icon_export_rejects_unavailable_tenant_upload: Added unbound_session: Session parameter, replaced session=Mock() call
  • test_roster_export_embeds_agent_icon: Added unbound_session: Session parameter, replaced session=Mock() call

Fixes #44973 (partial - one file)

Replace session=Mock() with the unbound_session fixture in three test
methods that call collect_icon() where the session is only passed
through to a mocked _upload_files() method and never touches the DB.

This is part of the effort tracked in issue langgenius#44973 to migrate unit
tests away from mock SQLAlchemy sessions to real SQLite-backed or
unbound session fixtures.
@github-actions github-actions Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Oct 30, 2026
@asukaminato0721 asukaminato0721 self-assigned this Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 81.40% 81.56% +0.17%
Strict coverage 81.04% 81.27% +0.23%
Typed symbols 85,142 83,715 -1,427
Untyped symbols 19,543 18,990 -553
Modules 4385 4258 -127

@github-actions

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-10-30 11:56:48.312243621 +0000
+++ /tmp/pyrefly_pr.txt	2026-10-30 11:56:30.628188856 +0000
@@ -162,28 +162,6 @@
   --> providers/vdb/vdb-tencent/tests/e2e_tests/conftest.py:95:33
 ERROR Object of class `ModuleType` has no attribute `VectorType` [missing-attribute]
   --> providers/vdb/vdb-tidb-vector/tests/unit_tests/src/dify_vdb_tidb_vector/test_tidb_vector.py:77:5
-ERROR Unpacked keyword argument `str` is not assignable to parameter `port` with type `int | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
-  --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR Unpacked keyword argument `str` is not assignable to parameter `grpc_port` with type `int` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
-  --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR Unpacked keyword argument `str` is not assignable to parameter `prefer_grpc` with type `bool` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
-  --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR Unpacked keyword argument `str` is not assignable to parameter `https` with type `bool | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
-  --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR Unpacked keyword argument `str` is not assignable to parameter `timeout` with type `int | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
-  --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR Unpacked keyword argument `str` is not assignable to parameter `force_disable_check_same_thread` with type `bool` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
-  --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR Unpacked keyword argument `str` is not assignable to parameter `grpc_options` with type `dict[str, Any] | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
-  --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR Unpacked keyword argument `str` is not assignable to parameter `auth_token_provider` with type `(() -> Awaitable[str]) | (() -> str) | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
-  --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_service.py:152:20
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_service.py:153:35
-ERROR Argument `Any | None` is not assignable to parameter `cluster_response` with type `Mapping[str, Any]` in function `TidbService.extract_qdrant_endpoint` [bad-argument-type]
-   --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_service.py:154:75
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
   --> tests/e2e_tests/containers/controllers/console/app/test_chat_conversation_status_count_api.py:75:16
 ERROR Argument `Literal['app-run']` is not assignable to parameter `triggered_from` with type `SQLCoreOperations[WorkflowRunTriggeredFrom] | WorkflowRunTriggeredFrom` in function `models.workflow.WorkflowRun.__init__` [bad-argument-type]
@@ -2116,8 +2094,6 @@
    --> tests/helpers/workflow/table_runner.py:389:23
 ERROR `graph_runtime_state` is uninitialized [unbound-name]
    --> tests/helpers/workflow/table_runner.py:390:37
-WARN `URLError` is already caught earlier in this `try` statement, so it never matches here [unreachable-except-clause]
-   --> tests/pytest_dify.py:155:34
 ERROR Object of class `object` has no attribute `package` [missing-attribute]
    --> tests/unit_tests/commands/test_data_migration.py:218:16
 ERROR Object of class `object` has no attribute `options_override` [missing-attribute]
@@ -2222,26 +2198,6 @@
    --> tests/unit_tests/controllers/console/app/test_message.py:150:16
 ERROR Argument `str | None` is not assignable to parameter `s` with type `bytearray | bytes | str` in function `json.loads` [bad-argument-type]
    --> tests/unit_tests/controllers/console/app/test_model_config.py:891:36
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:325:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:336:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:365:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:390:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:431:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:461:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:488:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:529:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:592:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:613:34
 ERROR Object of class `WorkflowRun` has no attribute `retry_index` [missing-attribute]
    --> tests/unit_tests/controllers/console/app/test_workflow_run.py:222:5
 ERROR Missing argument `app_model` in function `handler` [missing-argument]
@@ -2300,14 +2256,8 @@
    --> tests/unit_tests/controllers/console/auth/test_email_register.py:236:12
 ERROR Object of class `FunctionType` has no attribute `side_effect` [missing-attribute]
    --> tests/unit_tests/controllers/console/auth/test_email_register.py:268:5
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_datasource_auth.py:828:33
 ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
   --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline.py:83:9
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline.py:303:25
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline.py:334:25
 ERROR Unexpected keyword argument `created_at` in function `models.workflow.WorkflowNodeExecutionModel.__init__` [unexpected-keyword]
    --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline_workflow.py:876:9
 ERROR Argument `datetime | None` is not assignable to parameter `value` with type `SQLCoreOperations[datetime] | datetime` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
@@ -2398,16 +2348,14 @@
   --> tests/unit_tests/controllers/console/datasets/test_external.py:86:17
 ERROR Argument `UUID` is not assignable to parameter `object` with type `ExternalKnowledgeApiPayload` in function `list.append` [bad-argument-type]
   --> tests/unit_tests/controllers/console/datasets/test_external.py:88:21
+ERROR Argument `UUID` is not assignable to parameter `object` with type `RequestContext` in function `list.append` [bad-argument-type]
+  --> tests/unit_tests/controllers/console/datasets/test_external.py:88:21
 ERROR Generator function should return `Generator` [bad-return]
   --> tests/unit_tests/controllers/console/tag/test_tags.py:66:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `form` with type `Form` in function `controllers.console.human_input_form._jsonify_form_definition` [bad-argument-type]
   --> tests/unit_tests/controllers/console/test_human_input_form.py:94:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `form` with type `Form` in function `controllers.console.human_input_form.ConsoleHumanInputFormApi._ensure_console_access` [bad-argument-type]
    --> tests/unit_tests/controllers/console/test_human_input_form.py:105:57
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/test_human_input_form.py:131:22
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/test_human_input_form.py:152:22
 ERROR Type `Response` is not iterable [not-iterable]
    --> tests/unit_tests/controllers/console/test_wraps.py:306:17
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `page` [bad-argument-type]
@@ -2462,16 +2410,6 @@
    --> tests/unit_tests/controllers/inner_api/plugin/test_wraps.py:423:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
    --> tests/unit_tests/controllers/inner_api/plugin/test_wraps.py:429:36
-ERROR Argument `(ParamSpec(Unknown)) -> Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-  --> tests/unit_tests/controllers/inner_api/test_runtime_credentials.py:77:32
-ERROR Argument `(ParamSpec(Unknown)) -> Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/test_runtime_credentials.py:107:32
-ERROR Argument `(ParamSpec(Unknown)) -> Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/test_runtime_credentials.py:154:32
-ERROR Argument `(ParamSpec(Unknown)) -> Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/test_runtime_credentials.py:202:32
-ERROR Argument `(ParamSpec(Unknown)) -> Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/test_runtime_credentials.py:216:32
 ERROR Attribute `payload` of class `Namespace` is a read-only property and cannot be set [read-only]
   --> tests/unit_tests/controllers/mcp/test_mcp.py:32:5
 ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
@@ -2970,8 +2908,6 @@
    --> tests/unit_tests/core/agent/test_fc_agent_runner.py:238:9
 ERROR Argument `None` is not assignable to parameter `query` with type `str` in function `core.agent.fc_agent_runner.FunctionCallAgentRunner._organize_user_query` [bad-argument-type]
    --> tests/unit_tests/core/agent/test_fc_agent_runner.py:339:46
-ERROR `list[str]` is not assignable to attribute `files` with type `Sequence[File] | list[File]` [bad-assignment]
-   --> tests/unit_tests/core/agent/test_fc_agent_runner.py:351:24
 ERROR Object of class `FunctionCallAgentRunner` has no attribute `session` [missing-attribute]
    --> tests/unit_tests/core/agent/test_fc_agent_runner.py:407:58
 ERROR Object of class `FunctionCallAgentRunner` has no attribute `session` [missing-attribute]
@@ -3116,6 +3052,10 @@
     --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1450:33
 ERROR Object of type `Generator[Mapping[str, Any] | str] | Mapping[str, Any]` has no attribute `ok` [missing-attribute]
     --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1453:16
+ERROR Object of class `NoneType` has no attribute `app_id` [missing-attribute]
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1457:16
+ERROR Object of class `NoneType` has no attribute `user_id` [missing-attribute]
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1458:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `RuntimeState` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator.resume` [bad-argument-type]
     --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1498:33
 ERROR Object of type `Generator[Mapping[str, Any] | str] | Mapping[str, Any]` has no attribute `ok` [missing-attribute]
@@ -3686,6 +3626,8 @@
    --> tests/unit_tests/core/app/apps/test_workflow_app_runner.py:925:59
 ERROR Argument `TestWorkflowAppRunnerCoreCases.TestWorkflowBasedAppRunner.test_handle_start_node_result_events_project_outputs._QueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
     --> tests/unit_tests/core/app/apps/test_workflow_app_runner.py:1004:59
+ERROR Object of class `object` has no attribute `outputs` [missing-attribute]
+    --> tests/unit_tests/core/app/apps/test_workflow_app_runner.py:1027:20
 ERROR Argument `_DummyQueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
     --> tests/unit_tests/core/app/apps/test_workflow_app_runner.py:1056:55
 ERROR Argument `_DummyWorkflowEntry` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.handle_event` [bad-argument-type]
@@ -3722,6 +3664,10 @@
     --> tests/unit_tests/core/app/apps/workflow/test_app_generator.py:1414:37
 ERROR Object of type `Generator[Mapping[str, Any] | str] | Mapping[str, Any]` has no attribute `ok` [missing-attribute]
     --> tests/unit_tests/core/app/apps/workflow/test_app_generator.py:1419:20
+ERROR Object of class `NoneType` has no attribute `app_id` [missing-attribute]
+    --> tests/unit_tests/core/app/apps/workflow/test_app_generator.py:1423:20
+ERROR Object of class `NoneType` has no attribute `user_id` [missing-attribute]
+    --> tests/unit_tests/core/app/apps/workflow/test_app_generator.py:1424:20
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `RuntimeState` in function `core.app.apps.workflow.app_generator.WorkflowAppGenerator.resume` [bad-argument-type]
     --> tests/unit_tests/core/app/apps/workflow/test_app_generator.py:1465:37
 ERROR Object of type `Generator[Mapping[str, Any] | str] | Mapping[str, Any]` has no attribute `ok` [missing-attribute]
@@ -4489,45 +4435,37 @@
 WARN Call to deprecated overload `contextlib.contextmanager` [deprecated]
    --> tests/unit_tests/core/repositories/test_sqlalchemy_workflow_node_execution_repository.py:874:1
 ERROR Argument `Literal[core.entities.provider_entities.ProviderQuotaType.TRIAL]` is not assignable to parameter `quota_type` with type `models.enums.ProviderQuotaType | SQLCoreOperations[models.enums.ProviderQuotaType | None] | None` in function `models.provider.Provider.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:120:20
+   --> tests/unit_tests/core/test_provider_manager.py:119:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:178:20
-ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:191:24
+   --> tests/unit_tests/core/test_provider_manager.py:177:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:200:24
-ERROR Argument `list[ProviderModelSetting]` is not assignable to parameter `provider_model_settings` with type `list[_ProviderModelSettingCacheEntry] | None` in function `core.provider_manager.ProviderManager._to_model_settings` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:221:37
-ERROR Argument `list[LoadBalancingModelConfig]` is not assignable to parameter `load_balancing_model_configs` with type `list[_LoadBalancingModelConfigCacheEntry] | None` in function `core.provider_manager.ProviderManager._to_model_settings` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:222:42
-ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:265:20
+   --> tests/unit_tests/core/test_provider_manager.py:190:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:274:24
+   --> tests/unit_tests/core/test_provider_manager.py:199:24
 ERROR Argument `list[ProviderModelSetting]` is not assignable to parameter `provider_model_settings` with type `list[_ProviderModelSettingCacheEntry] | None` in function `core.provider_manager.ProviderManager._to_model_settings` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:288:67
+   --> tests/unit_tests/core/test_provider_manager.py:220:37
 ERROR Argument `list[LoadBalancingModelConfig]` is not assignable to parameter `load_balancing_model_configs` with type `list[_LoadBalancingModelConfigCacheEntry] | None` in function `core.provider_manager.ProviderManager._to_model_settings` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:288:77
+   --> tests/unit_tests/core/test_provider_manager.py:221:42
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:478:20
+   --> tests/unit_tests/core/test_provider_manager.py:416:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:489:24
+   --> tests/unit_tests/core/test_provider_manager.py:427:24
 ERROR Argument `list[ProviderModelSetting]` is not assignable to parameter `provider_model_settings` with type `list[_ProviderModelSettingCacheEntry] | None` in function `core.provider_manager.ProviderManager._to_model_settings` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:509:37
+   --> tests/unit_tests/core/test_provider_manager.py:447:37
 ERROR Argument `list[LoadBalancingModelConfig]` is not assignable to parameter `load_balancing_model_configs` with type `list[_LoadBalancingModelConfigCacheEntry] | None` in function `core.provider_manager.ProviderManager._to_model_settings` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:510:42
+   --> tests/unit_tests/core/test_provider_manager.py:448:42
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:528:20
+   --> tests/unit_tests/core/test_provider_manager.py:466:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:539:24
+   --> tests/unit_tests/core/test_provider_manager.py:477:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:548:24
+   --> tests/unit_tests/core/test_provider_manager.py:486:24
 ERROR Argument `list[ProviderModelSetting]` is not assignable to parameter `provider_model_settings` with type `list[_ProviderModelSettingCacheEntry] | None` in function `core.provider_manager.ProviderManager._to_model_settings` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:569:37
+   --> tests/unit_tests/core/test_provider_manager.py:507:37
 ERROR Argument `list[LoadBalancingModelConfig]` is not assignable to parameter `load_balancing_model_configs` with type `list[_LoadBalancingModelConfigCacheEntry] | None` in function `core.provider_manager.ProviderManager._to_model_settings` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:570:42
+   --> tests/unit_tests/core/test_provider_manager.py:508:42
 WARN Identity comparison `False is True` is always False [unnecessary-comparison]
-    --> tests/unit_tests/core/test_provider_manager.py:1309:30
+    --> tests/unit_tests/core/test_provider_manager.py:1247:30
 ERROR Class member `DummyTool.get_runtime_parameters` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
   --> tests/unit_tests/core/tools/__base/test_tool.py:71:9
 ERROR Object of type `ToolInvokeMessage.BlobChunkMessage | ToolInvokeMessage.BlobMessage | ToolInvokeMessage.FileMessage | ToolInvokeMessage.JsonMessage | ToolInvokeMessage.LogMessage | ToolInvokeMessage.RetrieverResourceMessage | ToolInvokeMessage.TextMessage | ToolInvokeMessage.VariableMessage | None` has no attribute `text` [missing-attribute]

@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.82%. Comparing base (f945180) to head (8dcbc69).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #45162       +/-   ##
===========================================
+ Coverage   68.59%   89.82%   +21.22%     
===========================================
  Files        6088     6244      +156     
  Lines      368824   397314    +28490     
  Branches    78076    80019     +1943     
===========================================
+ Hits       253002   356879   +103877     
+ Misses     113017    34136    -78881     
- Partials     2805     6299     +3494     
Flag Coverage Δ
api 89.66% <ø> (+37.88%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asukaminato0721
asukaminato0721 added this pull request to the merge queue Oct 30, 2026
Merged via the queue into langgenius:main with commit 9fcff0a Oct 30, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

clean remaining mock session

2 participants