Fix how the request is set up in tests