Kaydet (Commit) eca3c7d3 authored tarafından Russell Keith-Magee's avatar Russell Keith-Magee

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
üst 66612ef5
......@@ -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()
[<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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment