From 58592e1cb1245ad5f8ca2b4f3294f4ed0ac210d0 Mon Sep 17 00:00:00 2001 From: Asuka Minato Date: Sat, 25 Jul 2026 23:12:17 +0900 Subject: [PATCH] test: use sqlite3 session in test_llm_quota (#38720) --- api/tests/unit_tests/core/app/test_llm_quota.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/api/tests/unit_tests/core/app/test_llm_quota.py b/api/tests/unit_tests/core/app/test_llm_quota.py index ec6ac134443..ba691bb298a 100644 --- a/api/tests/unit_tests/core/app/test_llm_quota.py +++ b/api/tests/unit_tests/core/app/test_llm_quota.py @@ -517,7 +517,6 @@ def test_deduct_llm_quota_for_model_ignores_unknown_quota_type() -> None: with ( patch("core.app.llm.quota.create_plugin_provider_manager", return_value=provider_manager), patch("services.credit_pool_service.CreditPoolService.deduct_credits_capped") as mock_deduct_credits, - patch("core.app.llm.quota.sessionmaker") as mock_sessionmaker, ): deduct_llm_quota_for_model( tenant_id="tenant-id", @@ -527,7 +526,6 @@ def test_deduct_llm_quota_for_model_ignores_unknown_quota_type() -> None: ) mock_deduct_credits.assert_not_called() - mock_sessionmaker.assert_not_called() def test_deduct_llm_quota_for_model_ignores_custom_provider_configuration() -> None: @@ -546,7 +544,6 @@ def test_deduct_llm_quota_for_model_ignores_custom_provider_configuration() -> N with ( patch("core.app.llm.quota.create_plugin_provider_manager", return_value=provider_manager), patch("services.credit_pool_service.CreditPoolService.deduct_credits_capped") as mock_deduct_credits, - patch("core.app.llm.quota.sessionmaker") as mock_sessionmaker, ): deduct_llm_quota_for_model( tenant_id="tenant-id", @@ -556,7 +553,6 @@ def test_deduct_llm_quota_for_model_ignores_custom_provider_configuration() -> N ) mock_deduct_credits.assert_not_called() - mock_sessionmaker.assert_not_called() def test_ensure_llm_quota_available_wrapper_warns_and_delegates() -> None: