'Registering with invalid data fails.'

def test_registration_failure(self):

    resp = self.client.post(reverse('registration_register'), data={'username': 'bob', 'email': 'bob@example.com', 'password1': 'secret', 'password2': 'notsecret'})
    self.assertEqual(200, resp.status_code)
    self.failIf(resp.context['form'].is_valid())
    self.assertEqual(0, len(mail.outbox))
