mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
queryset-refactor: Optimisation pass. The test suite is now within 2% of trunk and it's a fairly pathological case. Introduces a couple of test failures due to some simplification in the code. They'll be fixed later.
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6730 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -14,7 +14,7 @@ class Choice(models.Model):
|
||||
return u"Choice: %s in poll %s" % (self.choice, self.poll)
|
||||
|
||||
__test__ = {'API_TESTS':"""
|
||||
# Regression test for the use of None as a query value. None is interpreted as
|
||||
# Regression test for the use of None as a query value. None is interpreted as
|
||||
# an SQL NULL, but only in __exact queries.
|
||||
# Set up some initial polls and choices
|
||||
>>> p1 = Poll(question='Why?')
|
||||
@@ -29,10 +29,10 @@ __test__ = {'API_TESTS':"""
|
||||
[]
|
||||
|
||||
# Valid query, but fails because foo isn't a keyword
|
||||
>>> Choice.objects.filter(foo__exact=None)
|
||||
>>> Choice.objects.filter(foo__exact=None)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: Cannot resolve keyword 'foo' into field. Choices are: id, poll, choice
|
||||
TypeError: Cannot resolve keyword 'foo' into field. Choices are: choice, id, poll
|
||||
|
||||
# Can't use None on anything other than __exact
|
||||
>>> Choice.objects.filter(id__gt=None)
|
||||
|
||||
Reference in New Issue
Block a user