Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #17938 -- Made explicit object ordering in LiveServerDatabase t…

…est assertion. Thanks Nate Bragg for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17869 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 38115ea742a9d775d9b02d2b56ef5392a8b9165d 1 parent 4b3fd42
@claudep claudep authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 tests/regressiontests/servers/tests.py
View
7 tests/regressiontests/servers/tests.py
@@ -211,5 +211,8 @@ def test_database_writes(self):
Refs #2879.
"""
self.urlopen('/create_model_instance/')
- names = [person.name for person in Person.objects.all()]
- self.assertEquals(names, ['jane', 'robert', 'emily'])
+ self.assertQuerysetEqual(
+ Person.objects.all().order_by('pk'),
+ ['jane', 'robert', 'emily'],
+ lambda b: b.name
+ )
Please sign in to comment.
Something went wrong with that request. Please try again.