Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
test: migrate conftest and plugin lifecycle tests to SQLAlchemy 2.0 select() API (#34979)
dataCenter430e0139f91c85d
diff --git a/api/tests/integration_tests/conftest.py b/api/tests/integration_tests/conftest.pyindex 44adadeaa5c..b2e8dda443a 100644--- a/api/tests/integration_tests/conftest.py+++ b/api/tests/integration_tests/conftest.py@@ -8,6 +8,7 @@ from collections.abc import Generatorimport pytestfrom flask import Flaskfrom flask.testing import FlaskClient+from sqlalchemy import delete, selectfrom sqlalchemy.orm import Sessionfrom app_factory import create_app@@ -83,15 +84,15 @@ def setup_account(request) -> Generator[Account, None, None]:with _CACHED_APP.test_request_context():with Session(bind=db.engine, expire_on_commit=False) as session:- account = session.query(Account).filter_by(email=email).one()+ account = session.scalars(select(Account).filter_by(email=email)).one()yield accountwith _CACHED_APP.test_request_context():- db.session.query(DifySetup).delete()- db.session.query(TenantAccountJoin).delete()- db.session.query(Account).delete()- db.session.query(Tenant).delete()+ db.session.execute(delete(DifySetup))+ db.session.execute(delete(TenantAccountJoin))+ db.session.execute(delete(Account))+ db.session.execute(delete(Tenant))db.session.commit()diff --git a/api/tests/integration_tests/services/plugin/test_plugin_lifecycle.py b/api/tests/integration_tests/services/plugin/test_plugin_lifecycle.pyindex 951a5ab4b43..0a19debc392 100644--- a/api/tests/integration_tests/services/plugin/test_plugin_lifecycle.py+++ b/api/tests/integration_tests/services/plugin/test_plugin_lifecycle.py@@ -1,5 +1,5 @@import pytest-from sqlalchemy import delete+from sqlalchemy import delete, func, selectfrom core.db.session_factory import session_factoryfrom models import Tenant@@ -61,7 +61,11 @@ class TestPluginPermissionLifecycle:assert perm.debug_permission == TenantPluginPermission.DebugPermission.ADMINSwith session_factory.create_session() as session:- count = session.query(TenantPluginPermission).where(TenantPluginPermission.tenant_id == tenant).count()+ count = session.scalar(+ select(func.count())+ .select_from(TenantPluginPermission)+ .where(TenantPluginPermission.tenant_id == tenant)+ )assert count == 1