Merge pull request #22842 from mzulqarnain1/zulqarnain/BOM-1138

BOM-1138 -- Update assertRedirects usage
This commit is contained in:
Awais Qureshi
2020-01-14 16:57:08 +05:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -137,7 +137,7 @@ class CourseModeViewTest(CatalogIntegrationMixin, UrlResetMixin, ModuleStoreTest
# Configure whether we're upgrading or not
url = reverse('course_modes_choose', args=[six.text_type(prof_course.id)])
response = self.client.get(url)
self.assertRedirects(response, 'http://testserver/test_basket/add/?sku=TEST', fetch_redirect_response=False)
self.assertRedirects(response, '/test_basket/add/?sku=TEST', fetch_redirect_response=False)
ecomm_test_utils.update_commerce_config(enabled=False)
@httpretty.activate

View File

@@ -511,7 +511,7 @@ class TestAuthorizationView(_DispatchingViewTestCase):
Check that django-oauth2-provider gives an appropriate authorization response.
"""
# django-oauth-provider redirects to a confirmation page
self.assertRedirects(response, u'http://testserver/oauth2/authorize/confirm', target_status_code=200)
self.assertRedirects(response, u'/oauth2/authorize/confirm', target_status_code=200)
context = response.context_data
form = context['form']