Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

Backpatch of dc569c8
  • Loading branch information...
commit 0d3ec8d0fb74424bb49e3169d5d051a36e8d2348 1 parent 9efe1a7
Anssi Kääriäinen authored November 24, 2012
3  tests/regressiontests/m2m_through_regress/models.py
@@ -75,6 +75,9 @@ class Driver(models.Model):
75 75
     def __str__(self):
76 76
         return "%s" % self.name
77 77
 
  78
+    class Meta:
  79
+        ordering = ('name',)
  80
+
78 81
 @python_2_unicode_compatible
79 82
 class CarDriver(models.Model):
80 83
     car = models.ForeignKey('Car', to_field='make')
2  tests/regressiontests/m2m_through_regress/tests.py
@@ -168,7 +168,7 @@ def test_add(self):
168 168
         self.car.drivers._add_items('car', 'driver', self.unused_driver)
169 169
         self.assertQuerysetEqual(
170 170
             self.car.drivers.all(),
171  
-            ["<Driver: Ryan Briscoe>", "<Driver: Barney Gumble>"]
  171
+            ["<Driver: Barney Gumble>", "<Driver: Ryan Briscoe>"]
172 172
         )
173 173
 
174 174
     def test_add_null(self):

0 notes on commit 0d3ec8d

Please sign in to comment.
Something went wrong with that request. Please try again.