diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-12-22 11:16:04 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-12-22 11:16:04 +0000 |
| commit | e247b364472bd48cd067baa6231c14b500298a4e (patch) | |
| tree | 96fd1b6f64e9bed7c081a9bc402b38640d57489d /tests/regressiontests | |
| parent | f47cfe12ae7354eb1bbcc9fe0c58f84778501ff4 (diff) | |
queryset-refactor: Work around the fact that "where id is NULL" can return different results in different circumstances in MySQL(!!).
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
| -rw-r--r-- | tests/regressiontests/null_queries/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/regressiontests/null_queries/models.py b/tests/regressiontests/null_queries/models.py index 739b75d96d..d6993b8be5 100644 --- a/tests/regressiontests/null_queries/models.py +++ b/tests/regressiontests/null_queries/models.py @@ -26,11 +26,11 @@ __test__ = {'API_TESTS':""" # Exact query with value None returns nothing ("is NULL" in sql, but every 'id' # field has a value). ->>> Choice.objects.filter(id__exact=None) +>>> Choice.objects.filter(choice__exact=None) [] Excluding the previous result returns everything. ->>> Choice.objects.exclude(id=None).order_by('id') +>>> Choice.objects.exclude(choice=None).order_by('id') [<Choice: Choice: Because. in poll Q: Why? >, <Choice: Choice: Why Not? in poll Q: Why? >] # Valid query, but fails because foo isn't a keyword |
