Opened 108 minutes ago
Closed 58 minutes ago
#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:
- Search validation with extremely long strings (10,000 characters).
- Graceful handling of whitespace-only search queries.
- Correct ordering behavior when integer fields (like 'age') contain NULL values.
- Proper filtering for Many-to-Many relationships when no associations exist (empty/invalid ID).
All tests will pass against the main branch.
Note:
See TracTickets
for help on using tickets.
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.