Skip to content

Commit 3b70cf4

Browse files
timgrahamsarahboyce
authored andcommitted
[5.0.x] Added missing skips in constraint tests.
Backport of b6ad8b6 from main.
1 parent ca9880b commit 3b70cf4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/constraints/tests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,7 @@ def test_validate(self):
865865
ChildUniqueConstraintProduct(name=self.p1.name, color=self.p1.color),
866866
)
867867

868+
@skipUnlessDBFeature("supports_table_check_constraints")
868869
def test_validate_fields_unattached(self):
869870
Product.objects.create(price=42)
870871
constraint = models.UniqueConstraint(fields=["price"], name="uniq_prices")
@@ -1039,6 +1040,7 @@ def test_validate_nullable_textfield_with_isnull_true(self):
10391040
is_not_null_constraint.validate(Product, Product(price=4, discounted_price=3))
10401041
is_not_null_constraint.validate(Product, Product(price=2, discounted_price=1))
10411042

1043+
@skipUnlessDBFeature("supports_table_check_constraints")
10421044
def test_validate_nulls_distinct_expressions(self):
10431045
Product.objects.create(price=42)
10441046
constraint = models.UniqueConstraint(

0 commit comments

Comments
 (0)