1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #13725 -- take url scheme into account in assertRedirects

Scheme is handled correctly when making comparisons between two URLs. If
there isn't any scheme specified in the location where we are redirected to,
the original request's scheme is used. If present, the scheme in
``expected_url`` is the one used to make the comparations to.
This commit is contained in:
Unai Zalakain
2013-10-28 20:34:09 +01:00
parent 9b95fa7777
commit 9c5f6cd565
4 changed files with 38 additions and 5 deletions

View File

@@ -444,6 +444,9 @@ Tests
client can't fetch externals URLs, this allows you to use ``assertRedirects``
with redirects that aren't part of your Django app.
* Correct handling of scheme when making comparisons in
:meth:`~django.test.SimpleTestCase.assertRedirects`.
* The ``secure`` argument was added to all the request methods of
:class:`~django.test.Client`. If ``True``, the request will be made
through HTTPS.