Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #18317 -- Removed db specific raw SQL function from tests

A test in model_fields used LEN() in raw SQL. This function is not
available on some 3rd party backends. I removed this function and
ensured that the test works correctly (breaks pre e9bbdb3) with
the change.
  • Loading branch information...
commit 459c3b67b7a9aeb96c9a2d57b18c0987c02f2369 1 parent df7a65a
Anssi Kääriäinen authored May 22, 2012
2  tests/regressiontests/model_fields/tests.py
@@ -208,7 +208,7 @@ def test_return_type(self):
208 208
         # Verify that when an extra clause exists, the boolean
209 209
         # conversions are applied with an offset
210 210
         b5 = BooleanModel.objects.all().extra(
211  
-            select={'string_length': 'LENGTH(string)'})[0]
  211
+            select={'string_col': 'string'})[0]
212 212
         self.assertFalse(isinstance(b5.pk, bool))
213 213
 
214 214
 class ChoicesTests(test.TestCase):

0 notes on commit 459c3b6

Please sign in to comment.
Something went wrong with that request. Please try again.