mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #2170 -- "exact" lookups in MySQL are now case-sensitive (the same as other backends).
This is a backwards incompatible change if you were relying on 'exact' being case-insensitive. For that, you should be using 'iexact'. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7798 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
52cc11c4e2
commit
8e816c8304
3 changed files with 8 additions and 2 deletions
|
@ -97,6 +97,12 @@ __test__ = {'API_TESTS': ur"""
|
|||
>>> Article.objects.get(text__exact='The quick brown fox jumps over the lazy dog.')
|
||||
<Article: Article Test>
|
||||
|
||||
# Regression tests for #2170: test case sensitiveness
|
||||
>>> Article.objects.filter(text__exact='tHe qUick bRown fOx jUmps over tHe lazy dog.')
|
||||
[]
|
||||
>>> Article.objects.filter(text__iexact='tHe qUick bRown fOx jUmps over tHe lazy dog.')
|
||||
[<Article: Article Test>]
|
||||
|
||||
>>> Article.objects.get(text__contains='quick brown fox')
|
||||
<Article: Article Test>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue