diff --git a/ckanext/dcat/tests/test_harvester.py b/ckanext/dcat/tests/test_harvester.py index bc12a04f..3ebedc40 100644 --- a/ckanext/dcat/tests/test_harvester.py +++ b/ckanext/dcat/tests/test_harvester.py @@ -1047,7 +1047,7 @@ def _test_harvest_bad_format(self, url, bad_content, content_type): assert last_job_status['status'] == 'Finished' assert ('Error parsing the RDF file' - in last_job_status['gather_error_summary'][0][0]) + in last_job_status['gather_error_summary'][0]['message']) @responses.activate @patch.object(ckanext.dcat.harvesters.rdf.RDFParser, 'datasets') @@ -1082,7 +1082,7 @@ def test_harvest_exception_in_profile(self, mock_datasets): assert last_job_status['status'] == 'Finished' assert ('Error when processsing dataset' - in last_job_status['gather_error_summary'][0][0]) + in last_job_status['gather_error_summary'][0]['message']) @responses.activate def test_harvest_create_duplicate_titles(self): @@ -1219,8 +1219,8 @@ def test_harvest_before_download_errors_get_stored(self, reset_calls_counter): last_job_status = harvest_source['status']['last_job'] - assert 'Error 1' == last_job_status['gather_error_summary'][0][0] - assert 'Error 2' == last_job_status['gather_error_summary'][1][0] + assert 'Error 1' == last_job_status['gather_error_summary'][0]['message'] + assert 'Error 2' == last_job_status['gather_error_summary'][1]['message'] def test_harvest_update_session_extension_point_gets_called(self, reset_calls_counter): @@ -1365,8 +1365,8 @@ def test_harvest_after_download_errors_get_stored(self, reset_calls_counter): last_job_status = harvest_source['status']['last_job'] - assert 'Error 1' == last_job_status['gather_error_summary'][0][0] - assert 'Error 2' == last_job_status['gather_error_summary'][1][0] + assert 'Error 1' == last_job_status['gather_error_summary'][0]['message'] + assert 'Error 2' == last_job_status['gather_error_summary'][1]['message'] @responses.activate def test_harvest_after_parsing_extension_point_gets_called(self, reset_calls_counter): @@ -1480,8 +1480,8 @@ def test_harvest_after_parsing_errors_get_stored(self, reset_calls_counter): last_job_status = harvest_source['status']['last_job'] - assert 'Error 1' == last_job_status['gather_error_summary'][0][0] - assert 'Error 2' == last_job_status['gather_error_summary'][1][0] + assert 'Error 1' == last_job_status['gather_error_summary'][0]['message'] + assert 'Error 2' == last_job_status['gather_error_summary'][1]['message'] finally: plugin.after_parsing_mode = '' @@ -1648,7 +1648,7 @@ def test_harvest_with_before_create_raising_exception(self, reset_calls_counter) assert last_job_status['status'] == 'Finished' assert ('Error importing dataset' - in last_job_status['object_error_summary'][0][0]) + in last_job_status['object_error_summary'][0]['message']) assert ( last_job_status['stats'] ==