Skip to content

Improve test coverage and fix signal registration bug - #40

Merged
AevumDecessus merged 3 commits into
fragforce:devfrom
AevumDecessus:improve-coverage
Jun 29, 2026
Merged

Improve test coverage and fix signal registration bug#40
AevumDecessus merged 3 commits into
fragforce:devfrom
AevumDecessus:improve-coverage

Conversation

@AevumDecessus

Copy link
Copy Markdown
Contributor

Summary

  • Fix bug where books/signals.py post_delete receiver was never connected (module not imported in AppConfig.ready())
  • Add tests for signal handlers, admin classes (books + registration), and processing edge cases
  • Brings test count from 116 to 141

Test plan

  • All 141 tests pass in Docker (docker compose run --rm test)
  • Lint passes (ruff check .)
  • SonarCloud coverage gate passes

The post_delete receiver in books/signals.py was never connected because the module was not imported during app startup. Add the import in BooksConfig.ready() so the receiver is properly registered.

Add tests covering the delete_recording_file signal handler for all file cleanup paths.
Cover BookAdmin, NarratorAdmin, RecordingAdmin, QRCodeAdmin, EventCodeAdmin, and InviteLinkAdmin including get_exclude, get_fields, custom actions, and display methods.
Cover missing audio_file, missing raw file on disk, QR creation failure resilience, spawn_remux thread behavior, and recover_pending_recordings integration.
@AevumDecessus
AevumDecessus merged commit cd5b861 into fragforce:dev Jun 29, 2026
3 checks passed
@AevumDecessus
AevumDecessus deleted the improve-coverage branch June 29, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant