0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Remove hostnames from expected redirect URLs

This commit is contained in:
Karl Hobley 2017-10-26 16:42:35 +01:00 committed by Matt Westcott
parent 0f6f650178
commit 6fecf271fc

View File

@ -142,7 +142,7 @@ class TestMultiSite(BaseTestSettingView):
"""
start_url = reverse('wagtailsettings:edit', args=[
'tests', 'testsetting'])
dest_url = 'http://testserver' + reverse('wagtailsettings:edit', args=[
dest_url = reverse('wagtailsettings:edit', args=[
'tests', 'testsetting', self.default_site.pk])
response = self.client.get(start_url, follow=True)
self.assertRedirects(response, dest_url, status_code=302, fetch_redirect_response=False)
@ -154,7 +154,7 @@ class TestMultiSite(BaseTestSettingView):
"""
start_url = reverse('wagtailsettings:edit', args=[
'tests', 'testsetting'])
dest_url = 'http://example.com' + reverse('wagtailsettings:edit', args=[
dest_url = reverse('wagtailsettings:edit', args=[
'tests', 'testsetting', self.other_site.pk])
response = self.client.get(start_url, follow=True, HTTP_HOST=self.other_site.hostname)
self.assertRedirects(response, dest_url, status_code=302, fetch_redirect_response=False)