增加验收设备管理与动态资源调度

This commit is contained in:
2026-09-01 22:38:15 +08:00
parent 292bd3a126
commit 6f00b33f0a
7 changed files with 153 additions and 4 deletions

View File

@@ -1,11 +1,20 @@
import unittest
from unittest.mock import Mock, patch
from ocr_dashboard_service import export_evidences, get_comparison, get_summary, list_batches, list_results
from ocr_dashboard_service import export_evidences, get_comparison, get_summary, list_batches, list_configured_notes, list_results
from task_service import TaskError
class OcrDashboardServiceTest(unittest.TestCase):
@patch("ocr_dashboard_service.SESSION.get")
def test_configured_notes_reads_admin_list(self, get):
response = Mock()
response.json.return_value = {"data": [{"note_id": "note-1"}]}
get.return_value = response
self.assertEqual(list_configured_notes(), [{"note_id": "note-1"}])
self.assertTrue(get.call_args.args[0].endswith("/api/notes"))
@patch("ocr_dashboard_service.SESSION.get")
def test_list_batches_unwraps_framework_response(self, get):
response = Mock()