feat: 批量重跑实时刷新任务状态 (#143)
This commit is contained in:
@@ -1094,6 +1094,37 @@ class PDDTaskPageEventTest(unittest.TestCase):
|
||||
self.assertEqual(row.goods_id, "")
|
||||
self.assertFalse(hasattr(row, "pdd_data"))
|
||||
|
||||
def test_summary_to_row_uses_task_specific_running_text(self):
|
||||
common = dict(
|
||||
id=1,
|
||||
goods_id=None,
|
||||
title=None,
|
||||
target_color=None,
|
||||
target_size=None,
|
||||
price_cent=None,
|
||||
quantity=None,
|
||||
status=TaskStatus.RUNNING,
|
||||
updated_at="2026-08-11T08:00:00Z",
|
||||
)
|
||||
|
||||
collect = summary_to_row(
|
||||
TaskSummary(
|
||||
remote_task_id="COL-RUNNING",
|
||||
task_type=TaskType.COLLECT,
|
||||
**common,
|
||||
)
|
||||
)
|
||||
purchase = summary_to_row(
|
||||
TaskSummary(
|
||||
remote_task_id="PUR-RUNNING",
|
||||
task_type=TaskType.PURCHASE,
|
||||
**common,
|
||||
)
|
||||
)
|
||||
|
||||
self.assertEqual(collect.status, "采集中")
|
||||
self.assertEqual(purchase.status, "采购中")
|
||||
|
||||
def test_main_window_keeps_event_object_alive(self):
|
||||
window = MainWindow(
|
||||
task_repository=self.repository,
|
||||
|
||||
Reference in New Issue
Block a user