Convert redirection-related tests to use assertRedirects.
Review Request #10477 — Created March 30, 2019 and submitted
We have a number of unit tests that check for HTTP responses that
redirect to a different URL, and most of these are checking headers and
response codes manually rather than using
assertRedirectsis that we'd get the status codes and URL
checks built-in, but it also offers us a compatibility advantage. In
modern versions of Django, redirection URLs changed from absolute to
assertRedirectsknows how to factor this in for tests.
This change updates these unit tests to use
giving us compatibility across Django 1.6 and 1.11 for these tests.
Unit tests pass on Django 1.6 and 1.11.