def test_throw_exception(self): with self.assertRaisesWithMessage(Exception): er.handle_error_by_throwing_exception()