Skip to content

Conversation

@tobiascadee
Copy link
Collaborator

Add 298 unit tests covering 9 apps that were previously lacking test coverage:

  • accounts: 113 tests for models, forms, views, and admin actions
  • transport: 43 tests for Route/Ride models, views, and mixins
  • distribution: 34 tests for Shift model, views, and mixins
  • mailing: 28 tests for MailTemplate, helpers, and admin views
  • api: 24 tests for JSON/CSV response utilities and API endpoints
  • news: 23 tests for Newsitem model and list view
  • log: 13 tests for EventLog model
  • agenda: 14 tests for PersistentEvent and TransientEvent models
  • groups: 6 tests for GroupExt model

Test coverage includes:

  • Model field validation and business logic
  • Form validation and error handling
  • View permissions (login, staff, group requirements)
  • Admin actions (enable_user, anonymize_user, etc.)
  • Mixin behavior (UserIsInvolvedMixin, etc.)
  • API authentication and response formats

All tests use the existing VokoTestCase base class and factory-boy
for test data generation.

Add 298 unit tests covering 9 apps that were previously lacking test coverage:

- accounts: 113 tests for models, forms, views, and admin actions
- transport: 43 tests for Route/Ride models, views, and mixins
- distribution: 34 tests for Shift model, views, and mixins
- mailing: 28 tests for MailTemplate, helpers, and admin views
- api: 24 tests for JSON/CSV response utilities and API endpoints
- news: 23 tests for Newsitem model and list view
- log: 13 tests for EventLog model
- agenda: 14 tests for PersistentEvent and TransientEvent models
- groups: 6 tests for GroupExt model

Test coverage includes:
- Model field validation and business logic
- Form validation and error handling
- View permissions (login, staff, group requirements)
- Admin actions (enable_user, anonymize_user, etc.)
- Mixin behavior (UserIsInvolvedMixin, etc.)
- API authentication and response formats

All tests use the existing VokoTestCase base class and factory-boy
for test data generation.
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.

2 participants