yohanboniface / pytest-falcon

Pytest helpers for testing Falcon applications
16 stars 6 forks source link

Add a "cookie" kwarg shortcut #2

Open yohanboniface opened 8 years ago

yohanboniface commented 8 years ago

That takes a dict and set the 'Set-Cookie' headers cleanly.

yohanboniface commented 8 years ago

https://docs.python.org/3/library/http.cookies.html#http.cookies.SimpleCookie

stevelle commented 8 years ago

Worth noting that the user who asked in IRC this week wanted to seq a request cookie, not a response cookie. Thus setting a 'Cookie' header cleanly. Might be worth doing both.

yohanboniface commented 8 years ago

Worth noting that the user who asked in IRC this week wanted to seq a request cookie, not a response cookie.

Oh right, header is Cookie, not Set-Cookie, I mixed up things! ;) I think we only want request Cookie, i.e. pytest-falcon is all about faking request, but does not deals with responses apart from returning them to the user. I'm back in Paris, I'll try to work on that this week :)