diff --git a/tests/modeltests/model_formsets/models.py b/tests/modeltests/model_formsets/models.py index 81355400cf2..a8b0cdde5bd 100644 --- a/tests/modeltests/model_formsets/models.py +++ b/tests/modeltests/model_formsets/models.py @@ -3,6 +3,9 @@ from django.db import models class Author(models.Model): name = models.CharField(max_length=100) + class Meta: + ordering = ('name',) + def __unicode__(self): return self.name @@ -196,7 +199,7 @@ True ... instance.save() >>> formset.save_m2m() >>> instances[0].authors.all() -[, , , ] +[, , , ] # delete the author we created to allow later tests to continue working. >>> new_author.delete()