summaryrefslogtreecommitdiff
path: root/tests/modeltests/basic
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2008-06-06 11:47:47 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2008-06-06 11:47:47 +0000
commited1c21171c78c719d4218c222d5c68bf1dbcccec (patch)
tree166d6981597d7d23c48d3ec6534225f17814231e /tests/modeltests/basic
parent1452d46240609ff39dacf9ea2f759ed600c2f09f (diff)
Fixed #7366 -- Modified a few expected test outputs to remove the dependency on dictionary ordering. Thanks for the patch, Leo Soto.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7575 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/basic')
-rw-r--r--tests/modeltests/basic/models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/modeltests/basic/models.py b/tests/modeltests/basic/models.py
index d7c27cb15b..c3ad38d661 100644
--- a/tests/modeltests/basic/models.py
+++ b/tests/modeltests/basic/models.py
@@ -401,8 +401,9 @@ True
# The 'select' argument to extra() supports names with dashes in them, as long
# as you use values().
->>> Article.objects.filter(pub_date__year=2008).extra(select={'dashed-value': '1'}).values('headline', 'dashed-value')
-[{'headline': u'Article 11', 'dashed-value': 1}, {'headline': u'Article 12', 'dashed-value': 1}]
+>>> dicts = Article.objects.filter(pub_date__year=2008).extra(select={'dashed-value': '1'}).values('headline', 'dashed-value')
+>>> [sorted(d.items()) for d in dicts]
+[[('dashed-value', 1), ('headline', u'Article 11')], [('dashed-value', 1), ('headline', u'Article 12')]]
# If you use 'select' with extra() and names containing dashes on a query
# that's *not* a values() query, those extra 'select' values will silently be