增加验收设备管理与动态资源调度
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user