test(custom_auth): fix brittle superuser assertion#6855
test(custom_auth): fix brittle superuser assertion#6855kartik-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:
|
|
Hey @kartik-lamkhade , thanks for the contribution. A couple of comments in general:
Thanks! |
|
Hi @kartik-lamkhade, just following up on my previous comment. Please let me know if you're able to update the PR, otherwise we'll go ahead and close it. |
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)