You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to be able to write code like this:
withoverride_flag(MY_FLAG=True):
# do some code that checks the value of MY_FLAG
The tests tend to use Django override_settings for this purpose, but this feels too heavy for inline code that only needs to patch a single flag instead of modifying the entire settings structure (not to mention adding a dependency on "test" code).
I realize this might be complicated because of the way that flag states get cached on the request object, but I suspect that using override_settings wouldn't work there either if the flag states were already cached.
The text was updated successfully, but these errors were encountered:
It would be useful to be able to write code like this:
The tests tend to use Django
override_settings
for this purpose, but this feels too heavy for inline code that only needs to patch a single flag instead of modifying the entire settings structure (not to mention adding a dependency on "test" code).I realize this might be complicated because of the way that flag states get cached on the request object, but I suspect that using
override_settings
wouldn't work there either if the flag states were already cached.The text was updated successfully, but these errors were encountered: