From e9e906ce304afda10b2884f48edd83d30f616a3e Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Thu, 23 May 2024 18:13:03 +0330 Subject: [PATCH] fix: removing the exception test case! as we're ignoring the try catch, the test case related to mocking an exception won't happen. --- .../tests/unit/test_mediawiki_extractor.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/dags/hivemind_etl_helpers/tests/unit/test_mediawiki_extractor.py b/dags/hivemind_etl_helpers/tests/unit/test_mediawiki_extractor.py index c8da307b..6badf729 100644 --- a/dags/hivemind_etl_helpers/tests/unit/test_mediawiki_extractor.py +++ b/dags/hivemind_etl_helpers/tests/unit/test_mediawiki_extractor.py @@ -53,15 +53,3 @@ def test_handle_invalid_page_titles(self): documents = self.extractor.extract(page_ids=invalid_pages) self.assertEqual(len(documents), 0) self.mock_reader.load_data.assert_called_with(pages=invalid_pages) - - def test_extract_from_valid_pages_with_exception(self): - """ - Test extracting from valid pages with an exception occurring. - Expecting empty results. - """ - test_pages = ["Python_(programming_language)"] - self.mock_reader.load_data.side_effect = Exception("Mocked exception") - - documents = self.extractor.extract(page_ids=test_pages) - self.assertEqual(len(documents), 0) - self.mock_reader.load_data.assert_called_once_with(pages=test_pages)