fixup! updated URL config name and value; added DEPR ticket

This commit is contained in:
Nimisha Asthagiri
2019-02-14 09:17:31 -05:00
parent 7848dd737f
commit 551f07c130
4 changed files with 13 additions and 14 deletions

View File

@@ -116,12 +116,12 @@ class LearnerProfileViewTest(UrlResetMixin, ModuleStoreTestCase):
self.assertIn(attribute, response.content)
def test_redirect_view(self):
profile_url_base = "http://profile-spa/"
with override_settings(PROFILE_MICROFRONTEND_URL_BASE=profile_url_base):
profile_url = "http://profile-spa/abc/"
with override_settings(PROFILE_MICROFRONTEND_URL=profile_url):
with override_waffle_flag(REDIRECT_TO_PROFILE_MICROFRONTEND, active=True):
profile_path = reverse('learner_profile', kwargs={'username': self.USERNAME})
response = self.client.get(path=profile_path)
self.assertRedirects(response, profile_url_base + self.USERNAME, target_status_code=404)
self.assertRedirects(response, profile_url + self.USERNAME, target_status_code=404)
def test_records_link(self):
profile_path = reverse('learner_profile', kwargs={'username': self.USERNAME})

View File

@@ -48,7 +48,7 @@ def learner_profile(request, username):
GET /account/profile
"""
if REDIRECT_TO_PROFILE_MICROFRONTEND.is_enabled():
profile_microfrontend_url = "{}{}".format(settings.PROFILE_MICROFRONTEND_URL_BASE, username)
profile_microfrontend_url = "{}{}".format(settings.PROFILE_MICROFRONTEND_URL, username)
return redirect(profile_microfrontend_url)
try: