Skip to content

Commit

Permalink
Fixed ordering-related failure in m2m_through_regress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
akaariai committed Nov 24, 2012
1 parent bf1871d commit dc569c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/regressiontests/m2m_through_regress/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ class Driver(models.Model):
def __str__(self):
return "%s" % self.name

class Meta:
ordering = ('name',)

@python_2_unicode_compatible
class CarDriver(models.Model):
car = models.ForeignKey('Car', to_field='make')
Expand Down
2 changes: 1 addition & 1 deletion tests/regressiontests/m2m_through_regress/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def test_add(self):
self.car.drivers._add_items('car', 'driver', self.unused_driver)
self.assertQuerysetEqual(
self.car.drivers.all(),
["<Driver: Ryan Briscoe>", "<Driver: Barney Gumble>"]
["<Driver: Barney Gumble>", "<Driver: Ryan Briscoe>"]
)

def test_add_null(self):
Expand Down

0 comments on commit dc569c8

Please sign in to comment.