summaryrefslogtreecommitdiff
path: root/tests/postgres_tests
diff options
context:
space:
mode:
authorDavid Sanders <shang.xiao.sanders@gmail.com>2022-09-09 00:02:58 +1000
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-09-13 14:06:46 +0200
commitbe5e3b46f78d54f8fae5dc255295d771c2becaac (patch)
treed084aba8e55ca4d64f6857ac28088adba70b9e6c /tests/postgres_tests
parent148d60de741e16b5185fb517fc24c6bf5e5f705e (diff)
[4.1.x] Fixed #33996 -- Fixed CheckConstraint validation on NULL values.
Bug in 667105877e6723c6985399803a364848891513cc. Thanks James Beith for the report. Backport of e14d08cd894e9d91cb5d9f44ba7532c1a223f458 from main
Diffstat (limited to 'tests/postgres_tests')
-rw-r--r--tests/postgres_tests/test_constraints.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/postgres_tests/test_constraints.py b/tests/postgres_tests/test_constraints.py
index 2850d0eb3d..74c07e4fab 100644
--- a/tests/postgres_tests/test_constraints.py
+++ b/tests/postgres_tests/test_constraints.py
@@ -146,9 +146,7 @@ class SchemaTests(PostgreSQLTestCase):
check=Q(ints__startswith__gte=0),
name="ints_positive_range",
)
- msg = f"Constraint “{constraint.name}” is violated."
- with self.assertRaisesMessage(ValidationError, msg):
- constraint.validate(RangesModel, RangesModel())
+ constraint.validate(RangesModel, RangesModel())
def test_opclass(self):
constraint = UniqueConstraint(