summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/modeltests/ordering/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/modeltests/ordering/models.py b/tests/modeltests/ordering/models.py
index de08a75755..8b56731c55 100644
--- a/tests/modeltests/ordering/models.py
+++ b/tests/modeltests/ordering/models.py
@@ -56,6 +56,10 @@ API_TESTS = """
>>> Article.objects.order_by('headline')[1:3]
[Article 2, Article 3]
+# Getting a single item should work too:
+>>> Article.objects.all()[0]
+Article 4
+
# Use '?' to order randomly. (We're using [...] in the output to indicate we
# don't know what order the output will be in.
>>> Article.objects.order_by('?')