summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-01-06 20:43:14 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-01-06 20:43:14 +0000
commitbbfc645337610b4c974c4f5a225958367b4d294c (patch)
tree960c9744a8e7a65847c8cec5146f5d87937e2df9 /tests
parent7104000e52ee5f94f56f344faaa069a1909351c6 (diff)
Fixed #1181 -- get_in_bulk no longer fails on empty input. Also added unit tests. Thanks, akaihola
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1834 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/testapp/models/lookup.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/testapp/models/lookup.py b/tests/testapp/models/lookup.py
index f8445c4f60..2362bcbef9 100644
--- a/tests/testapp/models/lookup.py
+++ b/tests/testapp/models/lookup.py
@@ -65,6 +65,10 @@ Article 4
{3: Article 3}
>>> articles.get_in_bulk([1000])
{}
+>>> articles.get_in_bulk([])
+Traceback (most recent call last):
+ ...
+AssertionError: get_in_bulk() cannot be passed an empty list.
# get_values() is just like get_list(), except it returns a list of
# dictionaries instead of object instances -- and you can specify which fields