mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
feat(copilot): workflow_copilot_enabled feature flag
This commit is contained in:
1 parent
38cf016ee3
commit
0cfea5cea4
4 files changed
+27
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import pytest
|
||||
|
||||
from services import feature_service as feature_service_module
|
||||
from services.feature_service import FeatureService
|
||||
|
||||
|
||||
def test_workflow_copilot_flag_follows_config_true(monkeypatch: pytest.MonkeyPatch):
|
||||
monkeypatch.setattr(feature_service_module.dify_config, "WORKFLOW_COPILOT_ENABLED", True)
|
||||
|
||||
features = FeatureService.get_features("tenant-1")
|
||||
|
||||
assert features.workflow_copilot_enabled is True
|
||||
|
||||
|
||||
def test_workflow_copilot_flag_defaults_false(monkeypatch: pytest.MonkeyPatch):
|
||||
monkeypatch.setattr(feature_service_module.dify_config, "WORKFLOW_COPILOT_ENABLED", False)
|
||||
|
||||
features = FeatureService.get_features("tenant-1")
|
||||
|
||||
assert features.workflow_copilot_enabled is False
|
||||
Reference in new issue
Block a user