Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…base backends.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit eca3c7d3d6c05a13c788c980f49a6077f960a709 1 parent 66612ef
Russell Keith-Magee freakboy3742 authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 tests/modeltests/model_formsets/
5 tests/modeltests/model_formsets/
@@ -3,6 +3,9 @@
class Author(models.Model):
name = models.CharField(max_length=100)
+ class Meta:
+ ordering = ('name',)
def __unicode__(self):
@@ -196,7 +199,7 @@ def __unicode__(self):
>>> formset.save_m2m()
>>> instances[0].authors.all()
-[<Author: Charles Baudelaire>, <Author: Walt Whitman>, <Author: Paul Verlaine>, <Author: John Steinbeck>]
+[<Author: Charles Baudelaire>, <Author: John Steinbeck>, <Author: Paul Verlaine>, <Author: Walt Whitman>]
# delete the author we created to allow later tests to continue working.
>>> new_author.delete()
Please sign in to comment.
Something went wrong with that request. Please try again.