diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/test/client.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/django/test/client.py b/django/test/client.py index d56472c1ae..60dcfb4309 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -465,11 +465,15 @@ class Client(object): redirect_chain = response.redirect_chain redirect_chain.append((url, response.status_code)) + extra = {} + if scheme: + extra['wsgi.url_scheme'] = scheme + # The test client doesn't handle external links, # but since the situation is simulated in test_client, # we fake things here by ignoring the netloc portion of the # redirected URL. - response = self.get(path, QueryDict(query), follow=False) + response = self.get(path, QueryDict(query), follow=False, **extra) response.redirect_chain = redirect_chain # Prevent loops |
