Skip to content

Commit

Permalink
Fixed #15548 -- Added an ordering clause to prevent test failures und…
Browse files Browse the repository at this point in the history
…er Postgres. Thanks to bberes for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15743 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
freakboy3742 committed Mar 4, 2011
1 parent 806bffc commit 185b4f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions tests/regressiontests/modeladmin/models.py
Expand Up @@ -9,6 +9,9 @@ class Band(models.Model):
bio = models.TextField()
sign_date = models.DateField()

class Meta:
ordering = ('name',)

def __unicode__(self):
return self.name

Expand Down
4 changes: 2 additions & 2 deletions tests/regressiontests/modeladmin/tests.py
Expand Up @@ -154,9 +154,9 @@ class ConcertAdmin(ModelAdmin):
self.assertEqual(str(form["main_band"]),
'<select name="main_band" id="id_main_band">\n'
'<option value="" selected="selected">---------</option>\n'
'<option value="%d">The Doors</option>\n'
'<option value="%d">The Beatles</option>\n'
'</select>' % (self.band.id, band2.id))
'<option value="%d">The Doors</option>\n'
'</select>' % (band2.id, self.band.id))

class AdminConcertForm(forms.ModelForm):
class Meta:
Expand Down

0 comments on commit 185b4f4

Please sign in to comment.