title: Django Redirect Status Code Error
body: <p>I'm testing a Django app. When the user logs in, I redirect him to a graphs page. To test, I write</p>
  
  <pre><code>response = TestCase.client.post('app/login', {credentials}, follow=True)
  TestCase.assertRedirects(response, 'app/graphs')
  </code></pre>
  
  <p>which returns </p>
  
  <pre><code>AssertionError: False is not true : 
  Response didn't redirect as expected: Response code was 200 (expected 302).
  </code></pre>
  
  <hr>
  
  <p>Reasonable enough. <a href="https://docs.djangoproject.com/en/1.10/topics/testing/tools/#django.test.SimpleTestCase.assertRedirects" rel="nofollow">The docs say</a> <code>assertRedirects</code> has a <code>status_code</code> parameter. Then calling </p>
  
  <pre><code>TestCase.assertRedirects(response, 'app/graphs', status_code=200)
  </code></pre>
  
  <p>returns </p>
  
  <pre><code>AssertionError: False is not true : 
  Response didn't redirect as expected: Response code was 200 (expected 200).
  </code></pre>
  
  <p>What's going on?</p>