summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-12-02 18:21:07 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-12-02 18:21:07 +0000
commit805c364fcf52f69498e15ddd8960baa3e4bc6d34 (patch)
treed532c71e9942eeccbefe9de15e8826c98e11032e /tests
parent5e5768ae83f3950720921f25a473b39890528661 (diff)
Fixed #3511 -- Changed QuerySet.get() to return a MultipleObjectsReturned exception, rather than an assertion error. Thanks, Gary Wilson and cheeming.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6838 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/modeltests/get_object_or_404/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/modeltests/get_object_or_404/models.py b/tests/modeltests/get_object_or_404/models.py
index bd800317d3..d9f276b024 100644
--- a/tests/modeltests/get_object_or_404/models.py
+++ b/tests/modeltests/get_object_or_404/models.py
@@ -78,7 +78,7 @@ Http404: No Article matches the given query.
>>> get_object_or_404(Author.objects.all())
Traceback (most recent call last):
...
-AssertionError: get() returned more than one Author -- it returned ...! Lookup parameters were {}
+MultipleObjectsReturned: get() returned more than one Author -- it returned ...! Lookup parameters were {}
# Using an EmptyQuerySet raises a Http404 error.
>>> get_object_or_404(Article.objects.none(), title__contains="Run")