diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2013-11-07 14:30:04 -0800 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2013-11-07 14:30:04 -0800 |
| commit | 30203a0deaf82c8af26b1b5453851f83d2248b67 (patch) | |
| tree | b273cacae263d1158c0ea974712b0f8e014bdbec /docs | |
| parent | c29dd76f401853508e684b737697566eb719e7e0 (diff) | |
| parent | 9c5f6cd565f1bc519dec20e3e44313cb8d8e0e94 (diff) | |
Merge pull request #1850 from unaizalakain/ticket_13725
Fixed #13725 -- take url scheme into account in assertRedirects
Thanks to Loic for review.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/1.7.txt | 3 | ||||
| -rw-r--r-- | docs/topics/testing/overview.txt | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index b5e124ec3e..8c5e81d0f3 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -469,6 +469,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. diff --git a/docs/topics/testing/overview.txt b/docs/topics/testing/overview.txt index 7093138188..133931559e 100644 --- a/docs/topics/testing/overview.txt +++ b/docs/topics/testing/overview.txt @@ -1576,6 +1576,13 @@ your test suite. loaded. Since the test client can't fetch externals URLs, this is particularly useful if ``expected_url`` isn't part of your Django app. + .. versionadded:: 1.7 + + 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 comparisons to. + .. method:: SimpleTestCase.assertHTMLEqual(html1, html2, msg=None) Asserts that the strings ``html1`` and ``html2`` are equal. The comparison |
