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:
parent
0f6f650178
commit
6fecf271fc
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user