diff options
| author | Tim Graham <timograham@gmail.com> | 2026-05-12 01:56:30 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-12 07:56:30 +0200 |
| commit | 9f44c947c8841938266f9fd9358906ea8b517e4f (patch) | |
| tree | 164a3ed60012867228fe32ba63c9184557dca339 | |
| parent | 2314cdf1ff860058a6579bb9f9bac1253fc9ab43 (diff) | |
Removed constraints' test_validate_nullable_condition dependency on generated columns.
Co-authored-by: JaeHyuckSa <jaehyuck.sa.dev@gmail.com>
| -rw-r--r-- | tests/constraints/tests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/constraints/tests.py b/tests/constraints/tests.py index 0c10429c22..b6e7c88839 100644 --- a/tests/constraints/tests.py +++ b/tests/constraints/tests.py @@ -1299,15 +1299,15 @@ class UniqueConstraintTests(TestCase): @skipUnlessDBFeature("supports_comparing_boolean_expr") def test_validate_nullable_condition(self): - GeneratedFieldStoredProduct.objects.create(name="Product", price=42) + UniqueConstraintProduct.objects.create(name="Product", age=42) constraint = models.UniqueConstraint( fields=["name"], - name="uniq_name_for_positive_price", - condition=models.Q(price__gt=0), + name="uniq_name_for_positive_age", + condition=models.Q(age__gt=0), ) constraint.validate( - GeneratedFieldStoredProduct, - GeneratedFieldStoredProduct(name="Product", price=None), + UniqueConstraintProduct, + UniqueConstraintProduct(name="Product", age=None), ) def test_name(self): |
