Ticket #2170: 2170-fix-with-test.diff
File 2170-fix-with-test.diff, 1.7 KB (added by , 17 years ago) |
---|
-
django/db/backends/mysql_old/base.py
133 133 features = DatabaseFeatures() 134 134 ops = DatabaseOperations() 135 135 operators = { 136 'exact': '= %s',136 'exact': '= BINARY %s', 137 137 'iexact': 'LIKE %s', 138 138 'contains': 'LIKE BINARY %s', 139 139 'icontains': 'LIKE %s', -
django/db/backends/mysql/base.py
128 128 features = DatabaseFeatures() 129 129 ops = DatabaseOperations() 130 130 operators = { 131 'exact': '= %s',131 'exact': '= BINARY %s', 132 132 'iexact': 'LIKE %s', 133 133 'contains': 'LIKE BINARY %s', 134 134 'icontains': 'LIKE %s', -
tests/regressiontests/string_lookup/models.py
97 97 >>> Article.objects.get(text__exact='The quick brown fox jumps over the lazy dog.') 98 98 <Article: Article Test> 99 99 100 # Regression tests for #2170: test case sensitiveness 101 >>> Article.objects.filter(text__exact='tHe qUick bRown fOx jUmps over tHe lazy dog.') 102 [] 103 >>> Article.objects.filter(text__iexact='tHe qUick bRown fOx jUmps over tHe lazy dog.') 104 [<Article: Article Test>] 105 100 106 >>> Article.objects.get(text__contains='quick brown fox') 101 107 <Article: Article Test> 102 108