Commit e3ea9dde authored by Malcolm Tredinnick's avatar Malcolm Tredinnick
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
parent 2c4b13cb
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -79,4 +79,12 @@ True
>>> 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>]

"""}