django/tests/constraints
Simon Charette a2791f5ea2 [5.1.x] Refs #30581 -- Made unattached UniqueConstraint(fields) validation testable.
The logic allowing UniqueConstraint(fields).validate to preserve backward
compatiblity with Model.unique_error_message failed to account for cases where
the constraint might not be attached to a model which is a common pattern
during testing.

This changes allows for arbitrary UniqueConstraint(fields) to be tested in
isolation without requiring actual models backing them up.

Co-authored-by: Mark G <mark.gensler@protonmail.com>

Backport of 13922580cc from main.
2024-07-17 12:55:36 +02:00
..
__init__.py Fixed #11964 -- Added support for database check constraints. 2018-07-10 15:32:33 -04:00
models.py Refs #35234 -- Deprecated CheckConstraint.check in favor of .condition. 2024-03-01 07:15:32 +01:00
tests.py [5.1.x] Refs #30581 -- Made unattached UniqueConstraint(fields) validation testable. 2024-07-17 12:55:36 +02:00