Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.5.x] Fixed ordering-related failure in m2m_through_regress tests

Backpatch of dc569c8
  • Loading branch information...
commit 0d3ec8d0fb74424bb49e3169d5d051a36e8d2348 1 parent 9efe1a7
@akaariai akaariai authored
View
3  tests/regressiontests/m2m_through_regress/models.py
@@ -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')
View
2  tests/regressiontests/m2m_through_regress/tests.py
@@ -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):
Please sign in to comment.
Something went wrong with that request. Please try again.