From f499c0f4ee0d86f50264131a5764054657385104 Mon Sep 17 00:00:00 2001 From: Lena Daxenbichler Date: Mon, 9 Sep 2024 09:56:03 +0200 Subject: [PATCH] tests: fix referencebrowser extraction Errors (was not translated, works on my machine) --- src/cone/app/tests/__init__.py | 2 +- src/cone/app/tests/test_browser_referencebrowser.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cone/app/tests/__init__.py b/src/cone/app/tests/__init__.py index 387cf7fe..94906f72 100644 --- a/src/cone/app/tests/__init__.py +++ b/src/cone/app/tests/__init__.py @@ -61,7 +61,7 @@ def test_suite(): # pragma: no cover suite.addTest(unittest.findTestCases(test_browser_layout)) suite.addTest(unittest.findTestCases(test_browser_login)) suite.addTest(unittest.findTestCases(test_browser_order)) - # suite.addTest(unittest.findTestCases(test_browser_referencebrowser)) # XXX: extraction errors + suite.addTest(unittest.findTestCases(test_browser_referencebrowser)) # suite.addTest(unittest.findTestCases(test_browser_resources)) # XXX: can wait until resources finalized suite.addTest(unittest.findTestCases(test_browser_search)) suite.addTest(unittest.findTestCases(test_browser_settings)) diff --git a/src/cone/app/tests/test_browser_referencebrowser.py b/src/cone/app/tests/test_browser_referencebrowser.py index 233e9c50..36ac77ee 100644 --- a/src/cone/app/tests/test_browser_referencebrowser.py +++ b/src/cone/app/tests/test_browser_referencebrowser.py @@ -526,7 +526,7 @@ def test_single_reference(self): data = widget.extract(request) self.assertEqual( [data.value, data.extracted, data.errors], - [UNSET, '', [ExtractionError('Mandatory field was empty')]] + [UNSET, '', [ExtractionError('required_message',)]] ) request.params['ref'] = 'Item' @@ -667,7 +667,7 @@ def test_multi_reference(self): data = widget.extract(request) self.assertEqual( [data.value, data.extracted, data.errors], - [UNSET, [], [ExtractionError('Mandatory field was empty')]] + [UNSET, [], [ExtractionError('required_message',)]] ) request.params['ref-exists'] = 'exists'