Opened 12 years ago
Closed 12 years ago
#21636 closed Bug (wontfix)
distinct_on_fields tests require DatabaseFeature.ignores_nulls_in_unique_constraints
| Reported by: | Michael Manfre | Owned by: | nobody |
|---|---|---|---|
| Component: | Testing framework | Version: | 1.6 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
DistinctOnTests.setUp() requires DatabaseFeature.ignores_nulls_in_unique_constraints.
Django-mssql would skip all of theses tests due to can_distinct_on_fields = False, but it throws a database exception during setUp when it tries to insert multiple NULLs for the greatest_fan, nullable, unique field.
Change History (2)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
PR was accidentally made against 1.6.x. This is likely a non-issue with master because the can_distinct_on_fields check was bumped up to the class, instead of on each of the tests. None of the known database backends support can_distinct_on_fields, but not ignores_nulls_in_unique_constraints in such a way that causes an error during setUp.
https://github.com/django/django/pull/2090