From 51c9bb7cd16081133af4f0ab6d06572660309730 Mon Sep 17 00:00:00 2001 From: Xavier Fernandez Date: Wed, 22 Feb 2023 21:04:05 +0100 Subject: Refs #33829 -- Added violation_error_message to constraints' __repr__(). --- tests/postgres_tests/test_constraints.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/postgres_tests') diff --git a/tests/postgres_tests/test_constraints.py b/tests/postgres_tests/test_constraints.py index e601f347eb..a5248e1491 100644 --- a/tests/postgres_tests/test_constraints.py +++ b/tests/postgres_tests/test_constraints.py @@ -386,6 +386,17 @@ class ExclusionConstraintTests(PostgreSQLTestCase): "(OpClass(F(datespan), name=range_ops), '-|-')] " "name='exclude_overlapping'>", ) + constraint = ExclusionConstraint( + name="exclude_overlapping", + expressions=[(F("datespan"), RangeOperators.ADJACENT_TO)], + violation_error_message="Overlapping must be excluded", + ) + self.assertEqual( + repr(constraint), + "", + ) def test_eq(self): constraint_1 = ExclusionConstraint( -- cgit v1.3