Skip to content

Commit

Permalink
refactor the test assessor throws exception
Browse files Browse the repository at this point in the history
  • Loading branch information
feng-j678 committed Oct 28, 2024
1 parent e9f1686 commit 30699c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/tests/Test_PatchAssessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def test_raise_if_min_python_version_not_met(self):
self.runtime.patch_assessor.start_assessment()
self.assertEqual(str(context.exception), Constants.PYTHON_NOT_COMPATIBLE_ERROR_MSG.format(sys.version_info))

def test_raise_add_error_to_status(self):
def test_patch_assessment_throws_exception(self):
self.runtime.package_manager.get_all_updates = lambda: self.raise_ex()

with self.assertRaises(Exception) as context:
Expand All @@ -191,7 +191,7 @@ def test_raise_add_error_to_status(self):

def raise_ex(self):
raise Exception()

def mock_refresh_repo(self):
pass

Expand Down

0 comments on commit 30699c5

Please sign in to comment.