mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
[5.1.x] Added missing skips in constraint tests.
Backport of b6ad8b687a
from main.
This commit is contained in:
parent
694c45118a
commit
e9d4b03680
1 changed files with 2 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue