'Verify that dashboard will not throw internal server error if HttpClientError
raised while getting order detail for ecommerce.'

@ddt.data(HttpServerError, HttpClientError, SlumberBaseException)
@override_settings(ECOMMERCE_API_URL=TEST_API_URL)
def test_refund_cutoff_date_with_api_error(self, exception):

    from commerce.tests.mocks import mock_order_endpoint
    self.client.login(username=self.user.username, password=self.USER_PASSWORD)
    with mock_order_endpoint(order_number=self.ORDER_NUMBER, exception=exception, reset_on_exit=False):
        response = self.client.post(reverse('student.views.dashboard', args=[]))
        self.assertEqual(response.status_code, 200)
