diff --git a/ecommerce/bff/subscriptions/tests/test_subscription_views.py b/ecommerce/bff/subscriptions/tests/test_subscription_views.py index 57128fcfa64..0907def341e 100644 --- a/ecommerce/bff/subscriptions/tests/test_subscription_views.py +++ b/ecommerce/bff/subscriptions/tests/test_subscription_views.py @@ -138,6 +138,6 @@ def test_embargo_failure(self, mock_embargo_check): 'user_ip_address': self.ip_address, 'username': self.user.username }) - self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) + self.assertEqual(response.status_code, status.HTTP_200_OK) expected_data = {'error': 'User blocked by embargo check', 'error_code': 'embargo_failed'} self.assertCountEqual(json.loads(response.content.decode('utf-8')), expected_data) diff --git a/ecommerce/bff/subscriptions/views.py b/ecommerce/bff/subscriptions/views.py index 017ec94276e..a4d087c767a 100644 --- a/ecommerce/bff/subscriptions/views.py +++ b/ecommerce/bff/subscriptions/views.py @@ -43,7 +43,7 @@ def post(self, request, *args, **kwargs): ) return Response({'error': 'User blocked by embargo check', 'error_code': 'embargo_failed'}, - status=status.HTTP_400_BAD_REQUEST) + status=status.HTTP_200_OK) for product in available_products: mode = self._mode_for_product(product)