保存前端调整前的当前状态

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
LongtailandCopilot committed 2026-10-31 17:55:39 +08:00
1 parent f0be4f5596
commit 77012b93c6
10 files changed
+204 -3

No files matched your search

+13
View File
@@ -84,6 +84,19 @@ class ControllerTests(unittest.TestCase):
self.assertIsNone(store.run['active'])
def test_ui_remove_selected_articles(self):
store = self.controller.store
store.enqueue(ROOT / 'test/fixtures/article')
ids = [job['id'] for job in store.state()['jobs']]
with self.assertRaises(HTTPError):
self.request('/api/remove', {'ids': ids}, token=self.controller.bridge_token)
with self.assertRaises(HTTPError):
self.request('/bridge/remove', {'ids': ids}, token=self.controller.bridge_token)
code, body = self.request('/api/remove', {'ids': ids}, token=self.controller.ui_token)
self.assertEqual(code, 200)
self.assertEqual(json.loads(body)['removed'], 1)
self.assertEqual(store.state()['jobs'], [])
def test_ui_historical_result_reconciliation(self):
store = self.controller.store
store.enqueue(ROOT / 'test/fixtures/article')