diff options
Diffstat (limited to 'tests/model_formsets/models.py')
| -rw-r--r-- | tests/model_formsets/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/model_formsets/models.py b/tests/model_formsets/models.py index df6a68792b..7b7337fd52 100644 --- a/tests/model_formsets/models.py +++ b/tests/model_formsets/models.py @@ -37,6 +37,10 @@ class Book(models.Model): def __str__(self): return self.title + def clean(self): + # Ensure author is always accessible in clean method + assert self.author.name is not None + @python_2_unicode_compatible class BookWithCustomPK(models.Model): |
