From 459c3b67b7a9aeb96c9a2d57b18c0987c02f2369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anssi=20K=C3=A4=C3=A4ri=C3=A4inen?= Date: Tue, 22 May 2012 23:01:24 +0300 Subject: [PATCH] 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 e9bbdb39de) with the change. --- tests/regressiontests/model_fields/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/regressiontests/model_fields/tests.py b/tests/regressiontests/model_fields/tests.py index 4b48616e998..9c0f888a99c 100644 --- a/tests/regressiontests/model_fields/tests.py +++ b/tests/regressiontests/model_fields/tests.py @@ -208,7 +208,7 @@ class BooleanFieldTests(unittest.TestCase): # Verify that when an extra clause exists, the boolean # conversions are applied with an offset b5 = BooleanModel.objects.all().extra( - select={'string_length': 'LENGTH(string)'})[0] + select={'string_col': 'string'})[0] self.assertFalse(isinstance(b5.pk, bool)) class ChoicesTests(test.TestCase):