Convert redirection-related tests to use assertRedirects.

Review Request #10477 — Created March 30, 2019 and submitted

chipx86
Review Board
release-4.0.x
reviewboard

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 assertRedirects. The
advantage of assertRedirects is 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
relative, and assertRedirects knows how to factor this in for tests.

This change updates these unit tests to use assertRedirects instead,
giving us compatibility across Django 1.6 and 1.11 for these tests.

Unit tests pass on Django 1.6 and 1.11.

Summary
Convert redirection-related tests to use assertRedirects.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (ee5859b)
Loading...