Skip to content

Commit

Permalink
fix: removing the exception test case!
Browse files Browse the repository at this point in the history
as we're ignoring the try catch, the test case related to mocking an exception won't happen.
  • Loading branch information
amindadgar committed May 23, 2024
1 parent 6487bf0 commit e9e906c
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions dags/hivemind_etl_helpers/tests/unit/test_mediawiki_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit e9e906c

Please sign in to comment.