Commits

James Bennett  committed e709f54

Consolidate the redirect test

  • Participants
  • Parent commits b1be49e

Comments (0)

Files changed (1)

File registration/tests.py

                                            'email': 'alice@example.com',
                                            'password1': 'swordfish',
                                            'password2': 'swordfish' })
-        self.assertEqual(response.status_code, 302)
-        self.assertEqual(response['Location'], 'http://testserver%s' % reverse('registration_complete'))
+        self.assertRedirects(response,
+                             'http://testserver%s' % reverse('registration_complete'))
         self.assertEqual(len(mail.outbox), 1)
 
         # Invalid data can't register.