summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/modeltests/generic_relations/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/modeltests/generic_relations/models.py b/tests/modeltests/generic_relations/models.py
index a8e3577a2d..bd8478f534 100644
--- a/tests/modeltests/generic_relations/models.py
+++ b/tests/modeltests/generic_relations/models.py
@@ -131,8 +131,12 @@ __test__ = {'API_TESTS':"""
[<TaggedItem: clearish>]
# Queries across generic relations respect the content types. Even though there are two TaggedItems with a tag of "fatty", this query only pulls out the one with the content type related to Animals.
+>>> Animal.objects.order_by('common_name')
+[<Animal: Lion>, <Animal: Platypus>]
>>> Animal.objects.filter(tags__tag='fatty')
[<Animal: Platypus>]
+>>> Animal.objects.exclude(tags__tag='fatty')
+[<Animal: Lion>]
# If you delete an object with an explicit Generic relation, the related
# objects are deleted when the source object is deleted.