async def METHOD_NAME(client, to_user):
    response = await client.get("wallet", params={"usr": to_user.id})
    assert response.status_code == 307, f"{response.url} {response.status_code}"
    # determine the next redirect location
    request = client.build_request("GET", "wallet", params={"usr": to_user.id})
    i = 0
    while request is not None:
        response = await client.send(request)
        request = response.next_request
        if i == 0:
            # first redirect
            assert response.status_code == 307, f"{response.url} {response.status_code}"
        elif i == 1:
            # then get the actual page
            assert response.status_code == 200, f"{response.url} {response.status_code}"
        i += 1