修复新闻工作台换号联动流程

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
LongtailandCopilot committed 2026-11-01 15:11:41 +08:00
1 parent 7ab0bc3485
commit fd9474d0e1
15 files changed
+203 -34

No files matched your search

+10
View File
@@ -70,6 +70,16 @@ class ControllerTests(unittest.TestCase):
self.controller.scan(self.controller.manager.root)
self.assertEqual(len(self.controller.store.state()['jobs']), 1)
def test_bridge_start_and_pause(self):
store = self.controller.store
with self.assertRaises(ValueError):
self.controller.bridge('start', {})
store.configure(dict(fid=95, minimum=1, maximum=1, interval=0, history_checked=True))
for action, expected in [('start', True), ('pause', False), ('start', True)]:
code, body = self.request('/bridge/' + action, {}, token=self.controller.bridge_token)
self.assertEqual(code, 200)
self.assertEqual(json.loads(body)['running'], expected)
def test_bridge_skip_continues_queue(self):
store = self.controller.store
store.enqueue(ROOT / 'test/fixtures/article')