1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +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:
Russell Keith-Magee
2008-06-06 11:47:47 +00:00
parent 1452d46240
commit ed1c21171c
4 changed files with 19 additions and 14 deletions

View File

@@ -110,8 +110,9 @@ __test__ = {'API_TESTS':"""
>>> Article.objects.filter(Q(headline__startswith='Hello') | Q(headline__contains='bye')).count()
3
>>> list(Article.objects.filter(Q(headline__startswith='Hello'), Q(headline__contains='bye')).values())
[{'headline': u'Hello and goodbye', 'pub_date': datetime.datetime(2005, 11, 29, 0, 0), 'id': 3}]
>>> dicts = list(Article.objects.filter(Q(headline__startswith='Hello'), Q(headline__contains='bye')).values())
>>> [sorted(d.items()) for d in dicts]
[[('headline', u'Hello and goodbye'), ('id', 3), ('pub_date', datetime.datetime(2005, 11, 29, 0, 0))]]
>>> Article.objects.filter(Q(headline__startswith='Hello')).in_bulk([1,2])
{1: <Article: Hello>}