diff --git a/commerce_coordinator/apps/lms/tests/test_tasks.py b/commerce_coordinator/apps/lms/tests/test_tasks.py index 500f9e42..595d68a2 100644 --- a/commerce_coordinator/apps/lms/tests/test_tasks.py +++ b/commerce_coordinator/apps/lms/tests/test_tasks.py @@ -118,16 +118,11 @@ def test_retry_logic(self, mock_ct_get_order, mock_ct_get_state, mock_client): retry_payload['line_item_state_id'] = 'initial-state-id' retry_payload['order_version'] = 1 - with mock_client: - mock_client().enroll_user_in_course.side_effect = RequestException() - - try: - uut.apply( - args=self.unpack_for_uut(retry_payload), - throw=False - ) - except RequestException: - pass + mock_client().enroll_user_in_course.side_effect = RequestException() + uut.apply( + args=self.unpack_for_uut(retry_payload), + throw=False + ) expected_state_payload = EXAMPLE_FULFILLMENT_SIGNAL_PAYLOAD.copy() expected_state_payload['line_item_state_id'] = '2u-fulfillment-failure-state'