async def METHOD_NAME(
    client: TestClient, login_options: LoginOptions, capsys: CaptureFixture
):
    assert client.app
    async with NewUser(app=client.app) as user:
        reset_url = client.app.router["auth_reset_password"].url_for()
        response = await client.post(
            f"{reset_url}",
            json={
                "email": user["email"],
            },
        )
        assert response.url.path == reset_url.path
        await assert_status(response, web.HTTPOk, MSG_EMAIL_SENT.format(**user))
        out, err = capsys.readouterr()
        confirmation_url = parse_link(out)
        code = URL(confirmation_url).parts[-1]
        # emulates user click on email url
        response = await client.get(confirmation_url)
        assert response.status == 200
        assert (
            response.url.path_qs
            == URL(login_options.LOGIN_REDIRECT)
            .with_fragment("reset-password?code=%s" % code)
            .path_qs
        )
        # api/specs/webserver/v0/components/schemas/auth.yaml#/ResetPasswordForm
        reset_allowed_url = client.app.router["auth_reset_password_allowed"].url_for(
            code=code
        )
        new_password = get_random_string(5, 10)
        response = await client.post(
            f"{reset_allowed_url}",
            json={
                "password": new_password,
                "confirm": new_password,
            },
        )
        payload = await response.json()
        assert response.status == 200, payload
        assert response.url.path == reset_allowed_url.path
        await assert_status(response, web.HTTPOk, MSG_PASSWORD_CHANGED)
        # Try new password
        logout_url = client.app.router["auth_logout"].url_for()
        response = await client.post(f"{logout_url}")
        assert response.url.path == logout_url.path
        await assert_status(response, web.HTTPUnauthorized, "Unauthorized")
        login_url = client.app.router["auth_login"].url_for()
        response = await client.post(
            f"{login_url}",
            json={
                "email": user["email"],
                "password": new_password,
            },
        )
        assert response.url.path == login_url.path
        await assert_status(response, web.HTTPOk, MSG_LOGGED_IN)