feat(fulfillment): 增加工作台状态事件同步
This commit is contained in:
@@ -464,8 +464,15 @@ class TestBindingAndCompletion(_Base):
|
||||
assert task.issue_code == ""
|
||||
assert task.last_error == ""
|
||||
|
||||
def test_refresh_binding_maps_role_ready(self):
|
||||
def test_refresh_binding_maps_role_ready(self, monkeypatch):
|
||||
notified: list[int] = []
|
||||
monkeypatch.setattr(
|
||||
service,
|
||||
"notify_order_site_binding_state_async",
|
||||
lambda task_id: notified.append(task_id),
|
||||
)
|
||||
task = self._allocated()
|
||||
notified.clear()
|
||||
bind_task = DouyuTask(
|
||||
batch_id="bind-1",
|
||||
account_id=task.account_id,
|
||||
@@ -487,6 +494,7 @@ class TestBindingAndCompletion(_Base):
|
||||
|
||||
assert detail["task"]["bindingStatus"] == "role_ready"
|
||||
assert detail["task"]["bindTask"]["roleName"] == "测试角色"
|
||||
assert notified == [task.id]
|
||||
|
||||
def test_refresh_binding_clears_stale_failure_when_qr_is_pending(self):
|
||||
task = self._allocated()
|
||||
|
||||
Reference in New Issue
Block a user