Commit a1697e88 authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

[1.2.X] Fixed #15548 -- Added an ordering clause to prevent test failures...

[1.2.X] Fixed #15548 -- Added an ordering clause to prevent test failures under Postgres. Thanks to bberes for the report.

Backport of r15743 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent a9a85d7c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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

+2 −2
Original line number Diff line number Diff line
@@ -154,9 +154,9 @@ class ModelAdminTests(TestCase):
        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: