On Mon, Jan 04, 2016 at 03:22:10PM -0800, Nikolas Stevenson-Molnar wrote:
> HTTPretty may help with this. It will let you mock a response from the
> second server:
https://github.com/gabrielfalcao/httpretty
>
> _Nik
Hi Nikolas,
Thanks for your suggestion, unfortunately, I don't see how it helps in
my case.
What I'm after is some kind of integration test: when I try to load a
page form the relying instance, verify that it gets redirected to the
provider, and then it gets redirected back with the correct callback
parameters. In both cases I need to actually hit the respective server
running a Django app, since it involves side effects (and side
conditions), such as whether the user is logged in on the provider,
and some in-database state changes to verify that the callback was
valid.
I don't see how mocking a HTTP response would help me with this, but,
of course, I may be missing something here.
Cheers,
Michal