def METHOD_NAME(self):
    user = self.factory.create_user(is_invitation_pending=True)
    token = invite_token(user)
    password = "test1234"
    response = self.post_request(
        "/invite/{}".format(token),
        data={"password": password},
        org=self.factory.org,
    )
    self.assertEqual(response.status_code, 302)
    user = User.query.get(user.id)
    self.assertTrue(user.verify_password(password))
    self.assertFalse(user.is_invitation_pending)