Opened 6 years ago

Closed 6 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


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:2 Changed 6 years ago by Michael Manfre

Resolution: wontfix
Status: newclosed

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.

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