Skip to content

armgit / dify

Public Imported from GitHub
0

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.

test: use sqlite3 session in test_schedule_service (#38707)

Asuka Minato99d23135de7b
diff --git a/api/tests/unit_tests/services/test_schedule_service.py b/api/tests/unit_tests/services/test_schedule_service.py
index d5006bd5f26..aae37b885f0 100644
--- a/api/tests/unit_tests/services/test_schedule_service.py
+++ b/api/tests/unit_tests/services/test_schedule_service.py
@@ -5,7 +5,6 @@ from typing import Any
from unittest.mock import MagicMock, Mock
import pytest
-from sqlalchemy.orm import Session
from core.trigger.constants import TRIGGER_SCHEDULE_NODE_TYPE
from core.workflow.nodes.trigger_schedule.entities import VisualConfig
@@ -497,11 +496,6 @@ class TestScheduleWithTimezone(unittest.TestCase):
assert summer_next.hour == 14
-def session_mock() -> MagicMock:
- return MagicMock(spec=Session)
-
-
def _workflow(**kwargs: Any) -> Workflow:
graph_dict = kwargs.pop("graph_dict", {})
workflow = Workflow.new(