#37030 closed Cleanup/optimization (invalid)

Added edge-case test coverage for admin changelist search and ordering

Reported by: San the cyberpunk Owned by: San the cyberpunk
Component: Testing framework Version: 6.0
Severity: Normal Keywords:
Cc: San the cyberpunk Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

This contribution adds several edge-case tests to the admin_changelist suite to ensure robustness in search, ordering, and filtering.

The new tests in tests/admin_changelist/tests.py cover:

  1. Search validation with extremely long strings (10,000 characters).
  2. Graceful handling of whitespace-only search queries.
  3. Correct ordering behavior when integer fields (like 'age') contain NULL values.
  4. Proper filtering for Many-to-Many relationships when no associations exist (empty/invalid ID).

All tests will pass against the main branch.

Change History (1)

comment:1 by Simon Charette, 58 minutes ago

Resolution: invalid
Status: assignedclosed

Unless there's a specific problem at play here I don't think this is necessary; we don't add tests for cases that not proven to be problematic.

Note: See TracTickets for help on using tickets.
Back to Top