Updated comment on tests

This commit is contained in:
Neeraj Kumar 2022-09-27 22:04:11 +05:30
parent 1f5cab9997
commit e3b97dd736
1 changed files with 4 additions and 0 deletions

View File

@ -91,6 +91,10 @@ class InlineFormsetTests(TestCase):
ParentWithUUIDAlternateKey, ChildRelatedViaAK, fields="__all__"
)
formset = FormSet()
# When Child model relation to Parent model UUIDField but this UUIDField
# is not primary key so this UUIDField initial value shouldn't be None,
# Otherwise it'll generate Integrity error on saving parent model data.
self.assertIsNotNone(formset.forms[0].fields["parent"].initial)
def test_inlineformset_factory_nulls_default_pks_alternate_key_with_child(self):