From ad78699605a7923e00c1d125b08b20379e1c4d5e Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 26 Sep 2024 12:46:10 -0400 Subject: [PATCH] test: Use the correct exception. This test doesn't actually care about the type of the exception but use the Requests exception that you're likely to get instead of the edx-restapi-client/slumber one from before we dropped them. --- .../djangoapps/user_api/accounts/tests/test_settings_views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py b/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py index 874497664d..badee6e875 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py @@ -9,7 +9,7 @@ from django.http import HttpRequest from django.test import TestCase from django.test.utils import override_settings from django.urls import reverse -from edx_rest_api_client import exceptions +from requests import exceptions from edx_toggles.toggles.testutils import override_waffle_flag from lms.djangoapps.commerce.models import CommerceConfiguration @@ -210,7 +210,7 @@ class AccountSettingsViewTest(ThirdPartyAuthTestMixin, SiteMixin, ProgramsApiCon assert order_detail[i] == expected def test_commerce_order_detail_exception(self): - with mock_get_orders(exception=exceptions.HttpNotFoundError): + with mock_get_orders(exception=exceptions.HTTPError): order_detail = get_user_orders(self.user) assert not order_detail