summaryrefslogtreecommitdiff
path: root/tests/regressiontests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2009-03-01 01:59:18 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2009-03-01 01:59:18 +0000
commit016f12a2c27fd6006d43cc32af734dfd0ea96f98 (patch)
tree5c3634e9f4d30461ca07824f5585099a6362033d /tests/regressiontests
parent283c89e4c61fa99dfdf6688a12ed3ce5a3945347 (diff)
[1.0.X] Fixed insert/update handling when no database interaction is required.
Fixed #10205 as part of this. Backport of r9926 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
-rw-r--r--tests/regressiontests/queries/models.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py
index 755b9ffc3f..e3aebd7915 100644
--- a/tests/regressiontests/queries/models.py
+++ b/tests/regressiontests/queries/models.py
@@ -1056,6 +1056,20 @@ cases).
Bug #9985 -- qs.values_list(...).values(...) combinations should work.
>>> Note.objects.values_list("note", flat=True).values("id").order_by("id")
[{'id': 1}, {'id': 2}, {'id': 3}]
+>>> Annotation.objects.filter(notes__in=Note.objects.filter(note="n1").values_list('note').values('id'))
+[<Annotation: a1>]
+
+Bug #10028 -- ordering by model related to nullable relations(!) should use
+outer joins, so that all results are included.
+>>> _ = Plaything.objects.create(name="p1")
+>>> Plaything.objects.all()
+[<Plaything: p1>]
+
+Bug #10205 -- When bailing out early because of an empty "__in" filter, we need
+to set things up correctly internally so that subqueries can continue properly.
+>>> Tag.objects.filter(name__in=()).update(name="foo")
+0
+
"""}
# In Python 2.3 and the Python 2.6 beta releases, exceptions raised in __len__