Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added an ordering definition to make test output reliable across data…

…base backends.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit eca3c7d3d6c05a13c788c980f49a6077f960a709 1 parent 66612ef
Russell Keith-Magee authored
5  tests/modeltests/model_formsets/models.py
@@ -3,6 +3,9 @@
3 3
 class Author(models.Model):
4 4
     name = models.CharField(max_length=100)
5 5
 
  6
+    class Meta:
  7
+        ordering = ('name',)
  8
+
6 9
     def __unicode__(self):
7 10
         return self.name
8 11
 
@@ -196,7 +199,7 @@ def __unicode__(self):
196 199
 ...     instance.save()
197 200
 >>> formset.save_m2m()
198 201
 >>> instances[0].authors.all()
199  
-[<Author: Charles Baudelaire>, <Author: Walt Whitman>, <Author: Paul Verlaine>, <Author: John Steinbeck>]
  202
+[<Author: Charles Baudelaire>, <Author: John Steinbeck>, <Author: Paul Verlaine>, <Author: Walt Whitman>]
200 203
 
201 204
 # delete the author we created to allow later tests to continue working.
202 205
 >>> new_author.delete()

0 notes on commit eca3c7d

Please sign in to comment.
Something went wrong with that request. Please try again.