Merged
Conversation
Co-authored-by: animemoeus <33395829+animemoeus@users.noreply.github.com>
…e review fixes Co-authored-by: animemoeus <33395829+animemoeus@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve pytest coverage for Instagram app
Improve instagram app test coverage (77% → 98%)
Mar 4, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-authored-by: animemoeus <33395829+animemoeus@users.noreply.github.com>
Co-authored-by: animemoeus <33395829+animemoeus@users.noreply.github.com>
Copilot
AI
changed the title
Improve instagram app test coverage (77% → 98%)
Fix ruff linter errors in instagram/tests
Mar 4, 2026
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.
Description
This pull request adds comprehensive unit tests for the admin actions, models, serializers, and signal handlers in the Instagram app. The new tests focus on verifying custom admin actions, model behaviors, serializer validation and creation logic, and signal-triggered background tasks, improving the reliability and coverage of critical features.
Admin actions testing:
InstagramUserAdmin, verifying correct behavior and error handling for updating user profiles and queuing story/post updates via API. (instagram/tests/admin/test_user_admin.py)Model logic testing:
StoryCreditandStoryCreditPaymentmodels, including string representations, credit accumulation, and ensuring credits are created and updated correctly when payments are made. (instagram/tests/models/test_credit.py)Serializer validation and creation:
instagram/tests/serializers/test_serializers.py)Signal handler testing:
instagram/tests/signals/test_signals.py)