From 3306b7283bc76a4e0cd647776fdc8b02d38d0935 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 13 Jun 2025 02:11:04 -0400 Subject: [PATCH] Refs #35676 -- Added supports_table_check_constraints skip to model_forms tests. --- tests/model_forms/models.py | 1 + tests/model_forms/tests.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/model_forms/models.py b/tests/model_forms/models.py index 6d984379f0..f6c34a3521 100644 --- a/tests/model_forms/models.py +++ b/tests/model_forms/models.py @@ -529,6 +529,7 @@ class ConstraintsModel(models.Model): price = models.DecimalField(max_digits=10, decimal_places=2, default=0) class Meta: + required_db_features = {"supports_table_check_constraints"} constraints = [ models.UniqueConstraint( "name", diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py index 59e5ee0242..57249820ed 100644 --- a/tests/model_forms/tests.py +++ b/tests/model_forms/tests.py @@ -3721,6 +3721,7 @@ class ModelToDictTests(TestCase): self.assertEqual(data, [blue]) +@skipUnlessDBFeature("supports_table_check_constraints") class ConstraintValidationTests(TestCase): def test_unique_constraint_refs_excluded_field(self): obj = ConstraintsModel.objects.create(name="product", price="1.00")