jazzband / django-waffle

A feature flipper for Django
https://waffle.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.12k stars 258 forks source link

Always set testing cookies, even on pages which do not use them #505

Open dragon-dxw opened 4 months ago

dragon-dxw commented 4 months ago

Addresses https://github.com/jazzband/django-waffle/issues/80

Uses code from https://github.com/OpenHumans/open-humans/pull/1109

Modifies the tests slightly to attempt to set the cookie on a page which doesn't make use of waffle.

dragon-dxw commented 2 months ago

Taking another look, I think there's a slight issue with my changes to the tests -- we no longer test whether the results of the flag toggle are instantly available at the instant of having been run. If people make good noises I'll fix that (by broadly replicating the original test)