kopia lustrzana https://github.com/wagtail/wagtail
Remove hostnames from expected redirect URLs
rodzic
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)
|
||||
|
|
Ładowanie…
Reference in New Issue