Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a test to show that #8063 doesn't seem to be an issue any longer.

Refs #8063.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8427 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e3ea9ddef56fc8b7122209fec0fcca1ecd609092 1 parent 2c4b13c
@malcolmt malcolmt authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 tests/regressiontests/extra_regress/models.py
View
8 tests/regressiontests/extra_regress/models.py
@@ -79,4 +79,12 @@ def new_revision(self):
>>> list(User.objects.extra(select={"alpha": "%s"}, select_params=(-6,)).filter(id=u.id).values_list('id', flat=True)) == [u.id]
True
+# Regression test for #8063: limiting a query shouldn't discard any extra()
+# bits.
+>>> qs = User.objects.all().extra(where=['id=%s'], params=[u.id])
+>>> qs
+[<User: fred>]
+>>> qs[:1]
+[<User: fred>]
+
"""}
Please sign in to comment.
Something went wrong with that request. Please try again.