Update assertRedirects usage

This commit is contained in:
Zulqarnain
2020-01-08 14:35:40 +05:00
parent 2de89d6e49
commit cf58da6ee0
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']