diff --git a/tests/regressiontests/m2m_through_regress/models.py b/tests/regressiontests/m2m_through_regress/models.py index 23d3366f22..91e1aa8cc1 100644 --- a/tests/regressiontests/m2m_through_regress/models.py +++ b/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') diff --git a/tests/regressiontests/m2m_through_regress/tests.py b/tests/regressiontests/m2m_through_regress/tests.py index 828ec3618c..eba956b3ba 100644 --- a/tests/regressiontests/m2m_through_regress/tests.py +++ b/tests/regressiontests/m2m_through_regress/tests.py @@ -168,7 +168,7 @@ class ToFieldThroughTests(TestCase): self.car.drivers._add_items('car', 'driver', self.unused_driver) self.assertQuerysetEqual( self.car.drivers.all(), - ["", ""] + ["", ""] ) def test_add_null(self):