mirror of
https://github.com/langgenius/dify.git
synced 2026-09-24 23:22:26 +08:00
chore(api): convert BaseQueueDispatcher from ABC to Protocol (#37200)
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from services.workflow.queue_dispatcher import (
|
||||
BaseQueueDispatcher,
|
||||
ProfessionalQueueDispatcher,
|
||||
QueueDispatcherManager,
|
||||
QueuePriority,
|
||||
@@ -35,10 +32,6 @@ class TestDispatchers:
|
||||
assert d.get_queue_name() == QueuePriority.SANDBOX
|
||||
assert d.get_priority() == 10
|
||||
|
||||
def test_base_dispatcher_is_abstract(self):
|
||||
with pytest.raises(TypeError):
|
||||
BaseQueueDispatcher()
|
||||
|
||||
|
||||
class TestQueueDispatcherManager:
|
||||
@patch("services.workflow.queue_dispatcher.BillingService")
|
||||
|
||||
Reference in New Issue
Block a user