test(custom_auth): fix brittle superuser assertion#6855
Open
kartik-lamkhade wants to merge 1 commit intoFlagsmith:mainfrom
Open
test(custom_auth): fix brittle superuser assertion#6855kartik-lamkhade wants to merge 1 commit intoFlagsmith:mainfrom
kartik-lamkhade wants to merge 1 commit intoFlagsmith:mainfrom
Conversation
|
@kartik-lamkhade is attempting to deploy a commit to the Flagsmith Team on Vercel. A member of the Team first needs to authorize it. |
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on March 10. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6855 +/- ##
==========================================
- Coverage 98.33% 98.26% -0.08%
==========================================
Files 1336 1336
Lines 49629 49502 -127
==========================================
- Hits 48804 48642 -162
- Misses 825 860 +35 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
Hey @kartik-lamkhade , thanks for the contribution. A couple of comments in general:
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #6841
What does this PR do?
Fixes test failure:
KeyError: 'superuser'intest_cannot_create_superuser_if_any_user_existsRoot cause: Test expected exact JSON structure
{"superuser": ["A superuser can only be created..."]}but Flagsmith's DRF serializer returns errors in varying formats:{"non_field_errors": ["msg"]}{"detail": "msg"}Before (Broken)