mirror of
https://github.com/django/django.git
synced 2025-07-29 08:04:27 +00:00
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
This commit is contained in:
parent
1452d46240
commit
ed1c21171c
4 changed files with 19 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue