librelist archives

« back to archive

Testing with sessions

Testing with sessions

From:
Thadeus Burgess
Date:
2010-09-04 @ 04:45
Is there a way to make flask use sessions correctly with the test
client? Meaning that the session data will live on during multiple
self.app.test_client().get or self.app.test_client().post requests?

--
Thadeus

Re: [flask] Testing with sessions

From:
Dan Jacob
Date:
2010-09-04 @ 07:23
It should work fine, if you use with app.test_request_context().

On 4 September 2010 05:45, Thadeus Burgess <thadeusb@thadeusb.com> wrote:
> Is there a way to make flask use sessions correctly with the test
> client? Meaning that the session data will live on during multiple
> self.app.test_client().get or self.app.test_client().post requests?
>
> --
> Thadeus
>