From e9d4b03680c4763eee8f4f63a5b3f68ce4987f1a Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 26 Jul 2024 17:01:48 +0200 Subject: [PATCH] [5.1.x] Added missing skips in constraint tests. Backport of b6ad8b687adf011245270df17a38c1a42792e3d7 from main. --- tests/constraints/tests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/constraints/tests.py b/tests/constraints/tests.py index fd68c5156d..32f98a5529 100644 --- a/tests/constraints/tests.py +++ b/tests/constraints/tests.py @@ -896,6 +896,7 @@ class UniqueConstraintTests(TestCase): ChildUniqueConstraintProduct(name=self.p1.name, color=self.p1.color), ) + @skipUnlessDBFeature("supports_table_check_constraints") def test_validate_fields_unattached(self): Product.objects.create(price=42) constraint = models.UniqueConstraint(fields=["price"], name="uniq_prices") @@ -1070,6 +1071,7 @@ class UniqueConstraintTests(TestCase): is_not_null_constraint.validate(Product, Product(price=4, discounted_price=3)) is_not_null_constraint.validate(Product, Product(price=2, discounted_price=1)) + @skipUnlessDBFeature("supports_table_check_constraints") def test_validate_nulls_distinct_expressions(self): Product.objects.create(price=42) constraint = models.UniqueConstraint(