def METHOD_NAME(self):
    """api handles users with whitespaces around their passwords"""
    old_password = " old password "
    new_password = " N3wP@55w0rd "
    self.user.set_password(old_password)
    self.user.save()
    self.login_user(self.user)
    response = self.client.post(
        self.link, data={"new_password": new_password, "password": old_password}
    )
    self.assertEqual(response.status_code, 200)
    self.assertIn("Confirm password change", mail.outbox[0].subject)
    for line in [l.strip() for l in mail.outbox[0].body.splitlines()]:
        if line.startswith("http://"):
            token = line.rstrip("/").split("/")[-1]
            break
    else:
        self.fail("E-mail sent didn't contain confirmation url")
    response = self.client.get(
        reverse("misago:options-confirm-password-change", kwargs={"token": token})
    )
    self.assertEqual(response.status_code, 200)
    self.reload_user()
    self.assertTrue(self.user.check_password(new_password))