summaryrefslogtreecommitdiff
path: root/tests/model_formsets
diff options
context:
space:
mode:
authorNeeraj Kumar <sainineeraj1234@gmail.com>2023-07-07 08:12:25 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-07-07 08:18:31 +0200
commitb91d62cca07638741f5902713983f71478589b0e (patch)
treeb314fe3db1da7dd7e7609e28603edb49f35764ea /tests/model_formsets
parentf64fd47a7627ed6ffe2df2a32ded6ee528a784eb (diff)
Refs #24377 -- Added assertions for model inlines with primary key that has a default.
This ensures that a model field default is ignored.
Diffstat (limited to 'tests/model_formsets')
-rw-r--r--tests/model_formsets/test_uuid.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/model_formsets/test_uuid.py b/tests/model_formsets/test_uuid.py
index 2097bde82b..2084fc2987 100644
--- a/tests/model_formsets/test_uuid.py
+++ b/tests/model_formsets/test_uuid.py
@@ -43,6 +43,8 @@ class InlineFormsetTests(TestCase):
}
)
self.assertTrue(formset.is_valid())
+ self.assertIsNone(formset.instance.uuid)
+ self.assertIsNone(formset.forms[0].instance.parent_id)
def test_inlineformset_factory_nulls_default_pks_uuid_parent_auto_child(self):
"""