Commit 459c3b67 authored by Anssi Kääriäinen's avatar Anssi Kääriäinen
Browse files

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 e9bbdb39) with
the change.
parent df7a65ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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):