-
-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test util needed to enable flag for specific user instead of all users #439
Comments
Feel free to submit a pull request adding this functionality. |
adamantike
added a commit
to adamantike/django-waffle
that referenced
this issue
Dec 2, 2022
Up until now, the `override_flag` test util was only useful to completely activate or deactivate a flag. It didn't allow to provide more customization for all the internal checks it makes, like evaluating if the request user is authenticated or staff. This change provides that functionality, without breaking the current API, to avoid breaking changes. Now, users can provide more granular arguments to `override_flag`, for a more flexible flag testing. Closes jazzband#439.
adamantike
added a commit
to adamantike/django-waffle
that referenced
this issue
Dec 2, 2022
Up until now, the `override_flag` test util was only useful to completely activate or deactivate a flag. It didn't allow to provide more customization for all the internal checks it makes, like evaluating if the request user is authenticated or staff. This change provides that functionality, without breaking the current API, to avoid breaking changes. Now, users can provide more granular arguments to `override_flag`, for a more flexible flag testing. Closes jazzband#439.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In automated tests, to correctly test features sometimes a flag needs to be enabled for one user but not enabled for another user. The current test helper
override_flag
is can only mock on for all users or off for all users.The text was updated successfully, but these errors were encountered: