summaryrefslogtreecommitdiff
path: root/tests/modeltests/basic/models.py
diff options
context:
space:
mode:
authorJoseph Kocherhans <joseph@jkocherhans.com>2006-05-28 21:27:07 +0000
committerJoseph Kocherhans <joseph@jkocherhans.com>2006-05-28 21:27:07 +0000
commitaeb807989f711c61b75c42241eea4c942becf19a (patch)
tree3a77e523f60b17e323b73677b7988da8f3f0ab11 /tests/modeltests/basic/models.py
parent681763a29c9d82858a214a6898e807be0c835c47 (diff)
multi-auth: Merged to [2997]
git-svn-id: http://code.djangoproject.com/svn/django/branches/multi-auth@2998 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/basic/models.py')
-rw-r--r--tests/modeltests/basic/models.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/modeltests/basic/models.py b/tests/modeltests/basic/models.py
index 0470d6bc9b..f60c3777e7 100644
--- a/tests/modeltests/basic/models.py
+++ b/tests/modeltests/basic/models.py
@@ -283,6 +283,16 @@ Traceback (most recent call last):
...
AssertionError: Cannot combine queries once a slice has been taken.
+# Negative slices are not supported, due to database constraints.
+# (hint: inverting your ordering might do what you need).
+>>> Article.objects.all()[-1]
+Traceback (most recent call last):
+ ...
+AssertionError: Negative indexing is not supported.
+>>> Article.objects.all()[0:-5]
+Traceback (most recent call last):
+ ...
+AssertionError: Negative indexing is not supported.
# An Article instance doesn't have access to the "objects" attribute.
# That's only available on the class.