'Test that we can make a successful password change via the update form'

def test_password_change(self):

    c = self.c
    c.get(resolve_url(u'wiki:profile_update'))
    example_data = {u'password1': u'abcdef', u'password2': u'abcdef123', u'email': self.superuser1.email}
    response = c.post(resolve_url(u'wiki:profile_update'), example_data)
    self.assertContains(response, u'Passwords    don&#39;t    match', status_code=200)
    example_data = {u'password1': u'abcdef', u'password2': u'abcdef', u'email': self.superuser1.email}
    response = c.post(resolve_url(u'wiki:profile_update'), example_data)
    self.assertRedirects(response, str(django_settings.LOGIN_REDIRECT_URL))
    self.assertEqual(self.superuser1, authenticate(username=self.superuser1.username, password=example_data[u'password1']))
