summaryrefslogtreecommitdiff
path: root/tests/model_inheritance
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2025-01-13 13:53:57 -0500
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-01-14 16:21:19 +0100
commit4bfec242b488b174f7d386ab5bbd3363751cdb93 (patch)
tree20a92f0b4695b34feddb273bab28e6c72069836a /tests/model_inheritance
parente580926d74f4d5788feac05ac1d50626936631d7 (diff)
Fixed #36093 -- Adjusted unique checks to account for inherited primary keys.
Regression in bf7b17d16d3978b2e1cee4a0f7ce8840bd1a8dc4 refs #36075. Thanks Sage Abdullah for the report and tests.
Diffstat (limited to 'tests/model_inheritance')
-rw-r--r--tests/model_inheritance/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/model_inheritance/tests.py b/tests/model_inheritance/tests.py
index 6b005fcef0..cc333a9ac2 100644
--- a/tests/model_inheritance/tests.py
+++ b/tests/model_inheritance/tests.py
@@ -343,6 +343,11 @@ class ModelInheritanceTests(TestCase):
self.assertEqual(type(MethodOverride.foo), DeferredAttribute)
+ def test_full_clean(self):
+ restaurant = Restaurant.objects.create()
+ with self.assertNumQueries(0), self.assertRaises(ValidationError):
+ restaurant.full_clean()
+
class ModelInheritanceDataTests(TestCase):
@classmethod