diff options
Diffstat (limited to 'tests/postgres_tests')
| -rw-r--r-- | tests/postgres_tests/test_constraints.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_constraints.py b/tests/postgres_tests/test_constraints.py index 96b5d39092..f107bffcfe 100644 --- a/tests/postgres_tests/test_constraints.py +++ b/tests/postgres_tests/test_constraints.py @@ -797,6 +797,17 @@ class ExclusionConstraintTests(PostgreSQLTestCase): ), exclude={"datespan", "start", "end", "room"}, ) + # Constraints with excluded fields in condition are ignored. + constraint.validate( + HotelReservation, + HotelReservation( + datespan=(datetimes[1].date(), datetimes[2].date()), + start=datetimes[1], + end=datetimes[2], + room=room102, + ), + exclude={"cancelled"}, + ) def test_range_overlaps_custom(self): class TsTzRange(Func): |
