From eca3c7d3d6c05a13c788c980f49a6077f960a709 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sat, 26 Jul 2008 14:49:39 +0000 Subject: [PATCH] Added an ordering definition to make test output reliable across database backends. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8091 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/model_formsets/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/modeltests/model_formsets/models.py b/tests/modeltests/model_formsets/models.py index 81355400cf..a8b0cdde5b 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()