Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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 e9bbdb3) with
the change.
  • Loading branch information...
commit 459c3b67b7a9aeb96c9a2d57b18c0987c02f2369 1 parent df7a65a
@akaariai akaariai authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  tests/regressiontests/model_fields/tests.py
View
2  tests/regressiontests/model_fields/tests.py
@@ -208,7 +208,7 @@ def test_return_type(self):
# 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):
Please sign in to comment.
Something went wrong with that request. Please try again.